2025-09-13 22:02:27 +01:00
|
|
|
import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar"
|
|
|
|
import { Toaster } from "@/components/ui/sonner"
|
|
|
|
import DashboardSidebar from "@/dashboard/dashboard-sidebar"
|
|
|
|
import "@/styles/globals.css"
|
2025-09-14 10:59:49 +00:00
|
|
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
|
|
|
|
import { Outlet, createRootRoute } from "@tanstack/react-router"
|
|
|
|
import { TanStackRouterDevtools } from "@tanstack/router-devtools"
|
2025-09-13 22:02:27 +01:00
|
|
|
import { ConvexProvider, ConvexReactClient } from "convex/react"
|
|
|
|
|
|
|
|
export const Route = createRootRoute({
|
|
|
|
component: RootLayout,
|
|
|
|
})
|
|
|
|
|
|
|
|
const convexClient = new ConvexReactClient(process.env.BUN_PUBLIC_CONVEX_URL!)
|
2025-09-14 10:59:49 +00:00
|
|
|
const queryClient = new QueryClient()
|
2025-09-13 22:02:27 +01:00
|
|
|
|
|
|
|
function RootLayout() {
|
|
|
|
return (
|
2025-09-14 10:59:49 +00:00
|
|
|
<QueryClientProvider client={queryClient}>
|
|
|
|
<ConvexProvider client={convexClient}>
|
|
|
|
<SidebarProvider>
|
|
|
|
<div className="flex h-screen w-full">
|
|
|
|
<DashboardSidebar />
|
|
|
|
<SidebarInset>
|
|
|
|
<Outlet />
|
|
|
|
</SidebarInset>
|
|
|
|
</div>
|
|
|
|
<Toaster />
|
|
|
|
<TanStackRouterDevtools />
|
|
|
|
</SidebarProvider>
|
|
|
|
</ConvexProvider>
|
|
|
|
</QueryClientProvider>
|
2025-09-13 22:02:27 +01:00
|
|
|
)
|
|
|
|
}
|