Showing the Duplicate chatbot in the single screen
# 🤝help
f
I can't see the video, it's just an image
a
see at the bottom of this image it showing the two chatbot
if i will reduce the size then it showing the two chatbot
please tell me what should i do
f
Did you put your website together with something like WordPress, or did you code it?
a
code , i have added code in the react
can you help me resolving the issue
f
You have probably just added it one to many times
Have you tried just sending you code to ChatGPT and asking it?
a
i have asked but not resolved the problem
f
Can you share the code here?
a
import React, { useEffect, useState } from "react"; import { useUser } from "@clerk/clerk-react"; import axios from "axios"; const Chatbot = () => { useEffect(() => { if (upcomingHolidays.length > 0) { const script = document.createElement("script"); script.src = "https://cdn.botpress.cloud/webchat/v1/inject.js"; script.async = true; document.body.appendChild(script); script.onload = () => { window.botpressWebChat.init({ composerPlaceholder: "Say Something to Seva ...", botId: "7aa224p8-cf4d-4791-9c05-79a6ecd1e657", hostUrl: "https://cdn.botpress.cloud/webchat/v1", messagingUrl: "https://messaging.botpress.cloud", clientId: "7aa224p8-cf4d-4791-9c05-79a6ecd1e657", botName: "Seva", avatarUrl: "**", enableConversationDeletion: true, lazySocket: true, themeName: "prism", webhookId: "7872e718-df3b-4f6c-bad4-149113811baf", frontendVersion: "v1", showPoweredBy: false, theme: "prism", themeColor: "#2563eb", }); window.botpressWebChat.onEvent( (event) => { console.log(event); console.log(event.value.url); window.location = event.value.url; }, ["TRIGGER"] ); }; } }, []); return ; }; export default Chatbot;
Please check
f
You can try and follow this tutorial for setting it up https://botpress.com/docs/cloud/embedding-webchat-options/react-native/
a
<Route path="/setting" element={<>} /> this the route location Please check
f
Have you followed the docs that I sent?
a
unable to understand , totally different thats why i have sent the routes here i have added the bot
Please Help me
f
The docs I sent should be sufficient for implementing your Botpress bot into your React app. You can try and then copy the parts that you need from it into your own app
a
unable to understand how to chatbot integrate into the another component.