Skip to content

Commit

Permalink
feat: added demonstration chatbot embed (script)
Browse files Browse the repository at this point in the history
resolves #11
  • Loading branch information
jimbrig committed Apr 1, 2024
1 parent 9a3904d commit 5184e0f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
17 changes: 17 additions & 0 deletions app/app/components/ChatBot.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const ChatbotScript = () => (
<>
<script
dangerouslySetInnerHTML={{
__html: `
window.embeddedChatbotConfig = {
chatbotId: "VhVykMQoMKK6p-pu3I1wP",
domain: "www.chatbase.co"
};
`,
}}
/>
<script src="https://www.chatbase.co/embed.min.js" defer />
</>
);

export default ChatbotScript;
3 changes: 3 additions & 0 deletions app/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import {
// import "./styles/home.css";
// import "./styles/about.css"

import ChatbotScript from "./components/ChatBot";

export function Layout({children}: {children: React.ReactNode}) {
return (
<html lang="en">
Expand All @@ -28,6 +30,7 @@ export function Layout({children}: {children: React.ReactNode}) {
{children}
<ScrollRestoration />
<Scripts />
<ChatbotScript />
</body>
</html>
);
Expand Down

0 comments on commit 5184e0f

Please sign in to comment.