diff --git a/src/components/AskBBAI.tsx b/src/components/AskBBAI.tsx index cd1316a..49d907f 100644 --- a/src/components/AskBBAI.tsx +++ b/src/components/AskBBAI.tsx @@ -1,6 +1,7 @@ "use client"; import { useEffect, useRef, useState } from "react"; +import { usePathname } from "next/navigation"; interface Msg { role: "user" | "assistant"; @@ -8,6 +9,7 @@ interface Msg { } export default function AskBBAI() { + const pathname = usePathname(); const [open, setOpen] = useState(false); const [input, setInput] = useState(""); const [busy, setBusy] = useState(false); @@ -32,6 +34,8 @@ export default function AskBBAI() { return () => document.removeEventListener("keydown", onKey); }, [open]); + if (pathname?.startsWith("/forum")) return null; + async function send() { const q = input.trim(); if (!q || busy) return;