-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__root.tsx
35 lines (32 loc) · 1012 Bytes
/
__root.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
import { Outlet, createRootRoute, useLocation } from '@tanstack/react-router';
import { TanStackRouterDevtools } from '@tanstack/router-devtools';
import { ConfigProvider } from 'antd';
import AsideNavigationMenu from '~/components/aside-navigation-menu';
export const Route = createRootRoute({
component: App,
});
function App() {
const location = useLocation();
const isSigninPage = location.pathname === '/';
return (
<ConfigProvider
theme={{
components: {
Menu: {
itemBg: '#f1f5f9',
},
},
}}
>
<main className="relative flex h-dvh">
{!isSigninPage && <AsideNavigationMenu />}
<div className="flex flex-col items-center justify-center w-full h-full">
<Outlet />
</div>
<TanStackRouterDevtools position="top-right" />
<ReactQueryDevtools initialIsOpen={false} />
</main>
</ConfigProvider>
);
}