Created
April 6, 2025 13:09
-
-
Save zi-gae/7c24edfbb74272d9b075bfedf866a3d2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react"; | |
import { Outlet } from "react-router-dom"; | |
import type { RouteObject } from "react-router-dom"; | |
import { AuthGuard } from "@/components/auth/supabase/auth-guard"; | |
import { Layout as DashboardLayout } from "@/components/dashboard/layout/layout"; | |
export const route: RouteObject = { | |
path: "dashboard", | |
element: ( | |
<AuthGuard> | |
<DashboardLayout> | |
<Outlet /> | |
</DashboardLayout> | |
</AuthGuard> | |
), | |
children: [ | |
{ | |
index: true, | |
lazy: async () => { | |
const { Page } = await import("@/pages/dashboard/overview"); | |
return { Component: Page }; | |
}, | |
}, | |
{ | |
path: "blank", | |
lazy: async () => { | |
const { Page } = await import("@/pages/dashboard/blank"); | |
return { Component: Page }; | |
}, | |
}, | |
], | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment