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.
28 lines
699 B
TypeScript
28 lines
699 B
TypeScript
"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>
|
|
{isPortal ? (
|
|
<>{children}</>
|
|
) : (
|
|
<>
|
|
<Sidebar />
|
|
<main className="ml-[220px] min-h-screen p-6 lg:p-8">{children}</main>
|
|
</>
|
|
)}
|
|
</I18nProvider>
|
|
</ThemeProvider>
|
|
);
|
|
}
|