"use client";
import { usePathname } from "next/navigation";
import type { ReactNode } from "react";
import { PresenceProvider } from "@/components/presence-provider";
import { TopNav } from "@/components/top-nav";
import { useBranding } from "@/lib/branding";
export function AppShell({ children }: { children: ReactNode }) {
const pathname = usePathname();
const branding = useBranding({ applyDocument: true, documentKey: pathname });
const normalizedPath = pathname.replace(/\/+$/, "") || "/";
const isLoginPage = normalizedPath === "/login";
// 批量生图页是画图页的副本,布局沿用画图页那套(浮动导航 + 无外框卡片)。
const isImagePage = normalizedPath === "/image" || normalizedPath === "/batch";
if (isLoginPage) {
return {children};
}
if (isImagePage) {
return (
);
}
return (
);
}