forked from baron/baron-sso
feat: integrate orgfront and expose internal ids
This commit is contained in:
11
orgfront/src/app/queryClient.ts
Normal file
11
orgfront/src/app/queryClient.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { QueryClient } from "@tanstack/react-query";
|
||||
|
||||
export const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
staleTime: 30_000,
|
||||
refetchOnWindowFocus: false,
|
||||
retry: 1,
|
||||
},
|
||||
},
|
||||
});
|
||||
46
orgfront/src/app/routes.tsx
Normal file
46
orgfront/src/app/routes.tsx
Normal file
@@ -0,0 +1,46 @@
|
||||
import { Navigate, createBrowserRouter } from "react-router-dom";
|
||||
import AuthCallbackPage from "../features/auth/AuthCallbackPage";
|
||||
import AuthGuard from "../features/auth/AuthGuard";
|
||||
import LoginPage from "../features/auth/LoginPage";
|
||||
import { TenantOrgChartPage } from "../features/orgchart/routes/OrgChartPage";
|
||||
import { OrgFrontLayout } from "../features/orgchart/routes/OrgFrontLayout";
|
||||
import { OrgPickerEmbedPreviewPage } from "../features/orgchart/routes/OrgPickerEmbedPreviewPage";
|
||||
import {
|
||||
OrgPickerEmbedPage,
|
||||
OrgPickerPage,
|
||||
} from "../features/orgchart/routes/OrgPickerPage";
|
||||
|
||||
export const router = createBrowserRouter(
|
||||
[
|
||||
{
|
||||
path: "/login",
|
||||
element: <LoginPage />,
|
||||
},
|
||||
{
|
||||
path: "/auth/callback",
|
||||
element: <AuthCallbackPage />,
|
||||
},
|
||||
{
|
||||
path: "/",
|
||||
element: <AuthGuard />,
|
||||
children: [
|
||||
{ index: true, element: <Navigate to="/chart" replace /> },
|
||||
{
|
||||
element: <OrgFrontLayout />,
|
||||
children: [
|
||||
{ path: "chart", element: <TenantOrgChartPage /> },
|
||||
{ path: "chart/:tenantId", element: <TenantOrgChartPage /> },
|
||||
{ path: "picker", element: <OrgPickerPage /> },
|
||||
{ path: "embed-preview", element: <OrgPickerEmbedPreviewPage /> },
|
||||
],
|
||||
},
|
||||
{ path: "embed/picker", element: <OrgPickerEmbedPage /> },
|
||||
],
|
||||
},
|
||||
],
|
||||
{
|
||||
future: {
|
||||
v7_startTransition: true,
|
||||
},
|
||||
} as unknown as Parameters<typeof createBrowserRouter>[1],
|
||||
);
|
||||
Reference in New Issue
Block a user