Files
juip-web/src/routers/index.tsx

61 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-07-24 18:00:22 +08:00
import { createBrowserRouter } from "react-router-dom"
2026-07-30 13:55:28 +08:00
import Channels from "@/admin/channels/page"
2026-07-24 18:00:22 +08:00
import Dashboard from "@/admin/dashboard/page"
2026-07-30 13:55:28 +08:00
import Funds from "@/admin/funds/page"
2026-07-24 18:00:22 +08:00
import AdminLayout from "@/admin/layout"
2026-08-07 16:54:21 +08:00
import LongPage from "@/admin/product/long"
import ShortPage from "@/admin/product/short"
2026-07-30 13:55:28 +08:00
import Whitelist from "@/admin/whitelist/page"
import AuthGuard from "@/components/authGuard"
2026-07-24 18:00:22 +08:00
import HomePage from "@/home"
import ClientPage from "@/home/client"
import HelpPage from "@/home/help"
import IpLinePage from "@/home/ipLine"
import LayoutPage from "@/home/layout"
import LoginPage from "@/home/login"
import ProductPage from "@/home/product"
2026-08-12 13:49:04 +08:00
import HttpPage from "@/home/product/http"
import RouterosPage from "@/home/product/routeros"
2026-07-24 18:00:22 +08:00
import SoftDownloadPage from "@/home/softDownload"
export const router = createBrowserRouter([
{
path: "/",
element: <LayoutPage />,
children: [
{ index: true, element: <HomePage /> },
{ path: "product", element: <ProductPage /> },
2026-08-12 13:49:04 +08:00
{ path: "product/http", element: <HttpPage /> },
{ path: "product/routeros", element: <RouterosPage /> },
2026-07-24 18:00:22 +08:00
{ path: "ipline", element: <IpLinePage /> },
{ path: "softdownload", element: <SoftDownloadPage /> },
{ path: "help", element: <HelpPage /> },
{ path: "client", element: <ClientPage /> },
],
},
{
path: "/login",
element: <LoginPage />,
},
{
path: "/admin",
2026-07-30 13:55:28 +08:00
element: (
<AuthGuard>
<AdminLayout />
</AuthGuard>
),
children: [
{ index: true, element: <Dashboard /> },
{ path: "channels", element: <Channels /> },
{ path: "whitelist", element: <Whitelist /> },
{ path: "funds", element: <Funds /> },
2026-08-07 16:54:21 +08:00
{
path: "product",
children: [
{ path: "long", element: <LongPage /> },
{ path: "short", element: <ShortPage /> },
],
},
2026-07-30 13:55:28 +08:00
],
2026-07-24 18:00:22 +08:00
},
])