add chatbot
This commit is contained in:
parent
5ab94bee12
commit
eceb472556
@ -4,6 +4,7 @@ import Sidebar from "@/components/Sidebar";
|
|||||||
import Topbar from "@/components/Topbar";
|
import Topbar from "@/components/Topbar";
|
||||||
import { usePrivy } from "@privy-io/react-auth";
|
import { usePrivy } from "@privy-io/react-auth";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
import Script from "next/script";
|
||||||
|
|
||||||
export default function DashboardLayout({
|
export default function DashboardLayout({
|
||||||
children,
|
children,
|
||||||
@ -21,6 +22,26 @@ export default function DashboardLayout({
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<main className="relative z-10">
|
<main className="relative z-10">
|
||||||
|
<Script id="landbot-script">{`
|
||||||
|
window.addEventListener('mouseover', initLandbot, { once: true });
|
||||||
|
window.addEventListener('touchstart', initLandbot, { once: true });
|
||||||
|
var myLandbot;
|
||||||
|
function initLandbot() {
|
||||||
|
if (!myLandbot) {
|
||||||
|
var s = document.createElement('script');
|
||||||
|
s.type = "module"
|
||||||
|
s.async = true;
|
||||||
|
s.addEventListener('load', function() {
|
||||||
|
var myLandbot = new Landbot.Livechat({
|
||||||
|
configUrl: 'https://storage.googleapis.com/landbot.online/v3/H-2923167-WL26NF7VJKJ3PAMV/index.json',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
s.src = 'https://cdn.landbot.io/landbot-3/landbot-3.0.0.mjs';
|
||||||
|
var x = document.getElementsByTagName('script')[0];
|
||||||
|
x.parentNode.insertBefore(s, x);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`}</Script>
|
||||||
<div className="mx-auto container max-w-[1720px] px-14">
|
<div className="mx-auto container max-w-[1720px] px-14">
|
||||||
<div className="min-h-[100svh] p-14 grid grid-cols-[268px_auto] gap-12 overflow-hidden">
|
<div className="min-h-[100svh] p-14 grid grid-cols-[268px_auto] gap-12 overflow-hidden">
|
||||||
<Sidebar />
|
<Sidebar />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user