Files
Mutual_Fund/frontend/components/agent-mount.tsx
T

18 lines
599 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"use client";
import { usePathname } from "next/navigation";
import { AgentChat } from "@/components/agent-chat";
/**
* 客户 / 游客侧的智能助手入口,挂在全局 layout 上,客户端页面(官网、基金、
* 用户中心等)右下角常驻。
*
* /admin 下不渲染:后台投顾用的是 AdminShell 里的投顾助手悬浮球
* (components/admin/assistant-launcher.tsx),两者都固定在右下角会互相遮挡。
*/
export function AgentMount() {
const pathname = usePathname();
if (pathname.startsWith("/admin")) return null;
return <AgentChat />;
}