add log for sign in, sign out, change password, remove upload file

This commit is contained in:
2026-01-09 19:38:54 +07:00
parent 427a1040cf
commit ae39cc111f
32 changed files with 1991 additions and 212 deletions

View File

@@ -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>