import { createFileRoute, Outlet, redirect } from "@tanstack/react-router" import AppSidebar from "@/components/Sidebar/AppSidebar" import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar" import { isLoggedIn } from "@/hooks/useAuth" /** * The full-bleed shell. Same frosted sidebar as `_layout`, but the content * region is the whole viewport: the flow editor floats its own chrome over the * canvas instead of sitting inside a padded column. * * Nothing here paints a surface. The canvas is `--background`, so an opaque * `bg-card` on the shell would sit *under* the floating sidebar and turn its * `bg-card/80 backdrop-blur-md` into a plain `bg-card` slab with a card-coloured * moat around it — the frost has to composite against the canvas to read right. */ export const Route = createFileRoute("/_canvas")({ component: CanvasLayout, beforeLoad: async () => { if (!isLoggedIn()) { throw redirect({ to: "/login" }) } }, }) function CanvasLayout() { return (
) } export default CanvasLayout