mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-25 20:40:36 +03:00
M: Add prefetching for auth
Some checks are pending
Frontend CI / build (22.x) (push) Waiting to run
Some checks are pending
Frontend CI / build (22.x) (push) Waiting to run
This commit is contained in:
parent
570b2e8468
commit
bb8824d2c3
|
@ -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