feat: add hidden /portal page for SinoCode iframe embedding
Full-screen landing page with glassmorphism cards linking to monitoring (8018), docs (8017), and analytics (8019). Sidebar is conditionally hidden on the portal route. Supports dark/light themes and i18n.
This commit is contained in:
@@ -1,16 +1,26 @@
|
||||
"use client";
|
||||
|
||||
import { type ReactNode } from "react";
|
||||
import { usePathname } from "next/navigation";
|
||||
import { I18nProvider } from "@/lib/i18n";
|
||||
import { ThemeProvider } from "@/lib/theme";
|
||||
import { Sidebar } from "@/components/Sidebar";
|
||||
|
||||
export function ClientProviders({ children }: { children: ReactNode }) {
|
||||
const pathname = usePathname();
|
||||
const isPortal = pathname === "/portal";
|
||||
|
||||
return (
|
||||
<ThemeProvider>
|
||||
<I18nProvider>
|
||||
<Sidebar />
|
||||
<main className="ml-[220px] min-h-screen p-6 lg:p-8">{children}</main>
|
||||
{isPortal ? (
|
||||
<>{children}</>
|
||||
) : (
|
||||
<>
|
||||
<Sidebar />
|
||||
<main className="ml-[220px] min-h-screen p-6 lg:p-8">{children}</main>
|
||||
</>
|
||||
)}
|
||||
</I18nProvider>
|
||||
</ThemeProvider>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user