react-simple-chatbot
react-simple-chatbot copied to clipboard
Redirect to another page on website using options button
I am having difficulty on how to redirect to another webpage on button click from options in Chatbot. Any help would be appreciated!
trigger to a custom step from here: https://lucasbassetti.com.br/react-simple-chatbot/#/docs/steps), and use any js function like window.opne(link) or any other function you want. Like:
function GoToPage(){
window.open('https://github.com/', "_blank");
return <p>Go to google</p>
}
{
id: '4',
options: [
{label: 'opt1', value: '1', trigger: '5'},
{label: 'opt2', value: '2', trigger: '6'}
]
},
{
id: '6',
component: <GoToPage />,
asMessage: true,
trigger: '7'
},
I am having difficulty on how to redirect to another webpage on button click from options in Chatbot. Any help would be appreciated!
+1 @LucasBassetti redirect the page by clicking on the options
but after using this code it is redirecting to git page after every click or typing in chatbot.