import { useCallback, useState } from "react"; import { Outlet } from "@tanstack/react-router"; import { STORAGE_KEYS } from "@/client/lib/constants"; import { Header } from "@/client/components/header"; import { Footer } from "@/client/components/footer"; import { Banners } from "@/client/components/ui/banners"; import { readStorageString, writeStorageString } from "@/client/lib/storage"; import { selectHasLocalSession, useAuthStore } from "@/client/stores/auth-store"; const NARROW_SHELL_CONTENT_CLASS = "mx-auto w-full max-w-7xl"; const NARROW_SHELL_ROW_CLASS = `${NARROW_SHELL_CONTENT_CLASS} border-l border-zinc-800/60`; export function StandaloneLayout() { const hasLocalSession = useAuthStore(selectHasLocalSession); const [storedLayout, setStoredLayout] = useState(() => readStorageString(STORAGE_KEYS.LAYOUT)); const expanded = hasLocalSession && storedLayout === "expanded"; const toggleLayout = useCallback(() => { const next = expanded ? "default" : "expanded"; writeStorageString(STORAGE_KEYS.LAYOUT, next); setStoredLayout(next); }, [expanded]); return (
Skip to content
); }