wip: refactor
This commit is contained in:
11
src/main.tsx
11
src/main.tsx
@@ -2,20 +2,11 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
|
||||
import { NDKProvider } from '@libs/ndk/provider';
|
||||
import { getSetting } from '@libs/storage';
|
||||
import { StorageProvider } from '@libs/storage/provider';
|
||||
|
||||
import App from './app';
|
||||
|
||||
const cacheTime = await getSetting('cache_time');
|
||||
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
cacheTime: parseInt(cacheTime),
|
||||
},
|
||||
},
|
||||
});
|
||||
const queryClient = new QueryClient();
|
||||
|
||||
const container = document.getElementById('root');
|
||||
const root = createRoot(container);
|
||||
|
||||
Reference in New Issue
Block a user