[rewrite] Updated frontend structure and played with custom routes
This commit is contained in:
1 parent
43063dcf4e
commit
073f01d070
243 files changed
+11778
-11940
No files matched your search
@@ -1,28 +1,28 @@
|
||||
import { QueryClient } from '@tanstack/react-query'
|
||||
import { createRootRouteWithContext, Outlet } from '@tanstack/react-router'
|
||||
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
|
||||
import { TanStackRouterDevtools } from '@tanstack/router-devtools'
|
||||
import { Toaster } from '@/components/ui/toaster'
|
||||
import GeneralError from '@/features/errors/general-error'
|
||||
import NotFoundError from '@/features/errors/not-found-error'
|
||||
import { QueryClient } from "@tanstack/react-query";
|
||||
import { createRootRouteWithContext, Outlet } from "@tanstack/react-router";
|
||||
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
||||
import { TanStackRouterDevtools } from "@tanstack/router-devtools";
|
||||
import { Toaster } from "@/components/ui/toaster";
|
||||
import GeneralError from "@/pages/errors/general-error";
|
||||
import NotFoundError from "@/pages/errors/not-found-error";
|
||||
|
||||
export const Route = createRootRouteWithContext<{
|
||||
queryClient: QueryClient
|
||||
queryClient: QueryClient;
|
||||
}>()({
|
||||
component: () => {
|
||||
return (
|
||||
<>
|
||||
<Outlet />
|
||||
<Toaster />
|
||||
{import.meta.env.MODE === 'development' && (
|
||||
<>
|
||||
<ReactQueryDevtools buttonPosition='bottom-left' />
|
||||
<TanStackRouterDevtools position='bottom-right' />
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
},
|
||||
notFoundComponent: NotFoundError,
|
||||
errorComponent: GeneralError,
|
||||
})
|
||||
component: () => {
|
||||
return (
|
||||
<>
|
||||
<Outlet />
|
||||
<Toaster />
|
||||
{import.meta.env.MODE === "development" && (
|
||||
<>
|
||||
<ReactQueryDevtools buttonPosition="bottom-left" />
|
||||
<TanStackRouterDevtools position="bottom-right" />
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
},
|
||||
notFoundComponent: NotFoundError,
|
||||
errorComponent: GeneralError
|
||||
});
|
||||
Reference in new issue
Block a user