@@ -2,7 +2,6 @@ import { createRootRoute, Outlet, redirect, useRouterState } from '@tanstack/rea
2
2
import { TanStackRouterDevtools } from '@tanstack/router-devtools' ;
3
3
import '../index.css' ;
4
4
import { ErrorBoundary } from '../components/ErrorBoundary' ;
5
- import { QueryClient , QueryClientProvider } from '@tanstack/react-query' ;
6
5
import { useBlueskyStore } from '../lib/bluesky/store' ;
7
6
import { Toaster } from 'sonner' ;
8
7
import { ReactQueryDevtools } from '@tanstack/react-query-devtools/production' ;
@@ -11,21 +10,6 @@ import { cn } from '../lib/utils';
11
10
import { Navbar } from '../components/Navbar' ;
12
11
import i18n from '../i18n' ;
13
12
14
- // Create a new query client instance
15
- const queryClient = new QueryClient ( {
16
- defaultOptions : {
17
- mutations : {
18
- onError : ( error ) => {
19
- console . error ( 'Mutation error:' , error ) ;
20
- } ,
21
- } ,
22
- queries : {
23
- retry : 1 ,
24
- staleTime : 1000 * 60 , // 1 minute
25
- } ,
26
- } ,
27
- } ) ;
28
-
29
13
export const Route = createRootRoute ( {
30
14
component : Root ,
31
15
beforeLoad : async ( { location } ) => {
@@ -76,23 +60,22 @@ function Root() {
76
60
) }
77
61
>
78
62
< ErrorBoundary >
79
- < QueryClientProvider client = { queryClient } >
80
- < div className = "flex mx-auto lg:flex-row lg:w-fit lg:gap-2" >
81
- < Navbar />
82
- < div className = "bg-white dark:bg-black text-gray-900 dark:text-gray-100 flex justify-center mx-auto" >
83
- < ErrorBoundary >
84
- < div className = { cn ( 'flex flex-col gap-2' , pathname !== '/' && 'max-w-[550px]' ) } >
85
- < Outlet key = "app" />
86
- </ div >
87
- </ ErrorBoundary >
88
- </ div >
63
+ < div className = "flex mx-auto lg:flex-row lg:w-fit lg:gap-2" >
64
+ < Navbar />
65
+ < div className = "bg-white dark:bg-black text-gray-900 dark:text-gray-100 flex justify-center mx-auto" >
66
+ < ErrorBoundary >
67
+ < div className = { cn ( 'flex flex-col gap-2' , pathname !== '/' && 'max-w-[550px]' ) } >
68
+ < Outlet key = "app" />
69
+ </ div >
70
+ </ ErrorBoundary >
89
71
</ div >
90
- { experiments . devMode && (
91
- < div className = "fixed bottom-12 right-2" >
92
- < ReactQueryDevtools buttonPosition = "relative" />
93
- </ div >
94
- ) }
95
- </ QueryClientProvider >
72
+ </ div >
73
+ { experiments . devMode && (
74
+ < div className = "fixed bottom-12 right-2" >
75
+ < ReactQueryDevtools buttonPosition = "relative" />
76
+ </ div >
77
+ ) }
78
+
96
79
{ experiments . devMode && (
97
80
< TanStackRouterDevtools
98
81
toggleButtonProps = { {
0 commit comments