add log for sign in, sign out, change password, remove upload file
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import NotFound from '@/components/NotFound';
|
||||
import { Toaster } from '@/components/ui/sonner';
|
||||
import { getLocale } from '@/paraglide/runtime';
|
||||
import { sessionQueries } from '@/service/queries';
|
||||
import {
|
||||
CheckIcon,
|
||||
InfoIcon,
|
||||
@@ -20,43 +19,41 @@ import React from 'react';
|
||||
import TanStackQueryDevtools from '../integrations/tanstack-query/devtools';
|
||||
import appCss from '../styles.css?url';
|
||||
|
||||
interface MyRouterContext {
|
||||
queryClient: QueryClient;
|
||||
}
|
||||
|
||||
export const Route = createRootRouteWithContext<MyRouterContext>()({
|
||||
beforeLoad: async ({ context }) => {
|
||||
const userSession = await context.queryClient.fetchQuery(
|
||||
sessionQueries.user(),
|
||||
);
|
||||
return { userSession };
|
||||
export const Route = createRootRouteWithContext<{ queryClient: QueryClient }>()(
|
||||
{
|
||||
// beforeLoad: async ({ context }) => {
|
||||
// const userSession = await context.queryClient.fetchQuery(
|
||||
// sessionQueries.user(),
|
||||
// );
|
||||
// return { userSession };
|
||||
// },
|
||||
head: () => ({
|
||||
meta: [
|
||||
{
|
||||
charSet: 'utf-8',
|
||||
},
|
||||
{
|
||||
name: 'viewport',
|
||||
content: 'width=device-width, initial-scale=1',
|
||||
},
|
||||
{
|
||||
title: 'Fuware',
|
||||
},
|
||||
{
|
||||
description: 'Fuware is a platform for managing your business.',
|
||||
},
|
||||
],
|
||||
links: [
|
||||
{
|
||||
rel: 'stylesheet',
|
||||
href: appCss,
|
||||
},
|
||||
],
|
||||
}),
|
||||
shellComponent: RootDocument,
|
||||
notFoundComponent: () => <NotFound />,
|
||||
},
|
||||
head: () => ({
|
||||
meta: [
|
||||
{
|
||||
charSet: 'utf-8',
|
||||
},
|
||||
{
|
||||
name: 'viewport',
|
||||
content: 'width=device-width, initial-scale=1',
|
||||
},
|
||||
{
|
||||
title: 'Fuware',
|
||||
},
|
||||
{
|
||||
description: 'Fuware is a platform for managing your business.',
|
||||
},
|
||||
],
|
||||
links: [
|
||||
{
|
||||
rel: 'stylesheet',
|
||||
href: appCss,
|
||||
},
|
||||
],
|
||||
}),
|
||||
shellComponent: RootDocument,
|
||||
notFoundComponent: () => <NotFound />,
|
||||
});
|
||||
);
|
||||
|
||||
function RootDocument({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
@@ -79,20 +76,20 @@ function RootDocument({ children }: { children: React.ReactNode }) {
|
||||
warning: <WarningIcon className="text-yellow-500" size={16} />,
|
||||
}}
|
||||
/>
|
||||
<React.Suspense>
|
||||
<TanStackDevtools
|
||||
config={{
|
||||
position: 'bottom-right',
|
||||
}}
|
||||
plugins={[
|
||||
{
|
||||
name: 'Tanstack Router',
|
||||
render: <TanStackRouterDevtoolsPanel />,
|
||||
},
|
||||
TanStackQueryDevtools,
|
||||
]}
|
||||
/>
|
||||
</React.Suspense>
|
||||
{/* <React.Suspense> */}
|
||||
<TanStackDevtools
|
||||
config={{
|
||||
position: 'bottom-right',
|
||||
}}
|
||||
plugins={[
|
||||
{
|
||||
name: 'Tanstack Router',
|
||||
render: <TanStackRouterDevtoolsPanel />,
|
||||
},
|
||||
TanStackQueryDevtools,
|
||||
]}
|
||||
/>
|
||||
{/* </React.Suspense> */}
|
||||
<Scripts />
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user