fix(forum): hide Ask AV Beat AI widget on Integration Room routes

This commit is contained in:
2026-06-26 23:17:50 +00:00
parent ab6f3041fc
commit 4acc068732

View File

@@ -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;