M: Add prefetching for auth
This commit is contained in:
parent
69243dee0b
commit
33e73dfb47
|
@ -33,8 +33,6 @@ function ApplicationLayout() {
|
|||
const noNavigation = useAppLayoutStore(state => state.noNavigation);
|
||||
const noFooter = useAppLayoutStore(state => state.noFooter);
|
||||
|
||||
// TODO: prefetch data
|
||||
|
||||
return (
|
||||
<ErrorBoundary FallbackComponent={ErrorFallback} onError={logError} onReset={resetState}>
|
||||
<NavigationState>
|
||||
|
|
|
@ -4,6 +4,11 @@ import { createRoot } from 'react-dom/client';
|
|||
|
||||
import App from './app';
|
||||
import GlobalProviders from './app/GlobalProviders';
|
||||
import { authApi } from './backend/auth/api';
|
||||
import { queryClient } from './backend/queryClient';
|
||||
|
||||
// Prefetch auth data
|
||||
queryClient.prefetchQuery(authApi.getAuthQueryOptions()).catch(console.error);
|
||||
|
||||
createRoot(document.getElementById('root')!).render(
|
||||
<GlobalProviders>
|
||||
|
|
Loading…
Reference in New Issue
Block a user