mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-20 07:26:19 +00:00
Merge branch 'Dev' into merge-duckie-main-2026-05-06
This commit is contained in:
+31
-1
@@ -1,5 +1,19 @@
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
import { StrictMode, Suspense } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import { ErrorBoundary } from 'react-error-boundary';
|
||||
import { App } from './App';
|
||||
import { LoadingView } from './components/loading/LoadingView';
|
||||
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
staleTime: 30_000,
|
||||
retry: 1,
|
||||
refetchOnWindowFocus: false
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
import './css/index.css';
|
||||
|
||||
@@ -44,4 +58,20 @@ import './css/user-profile/UserProfileView.css';
|
||||
|
||||
import './css/widgets/FurnitureWidgets.css';
|
||||
|
||||
createRoot(document.getElementById('root')).render(<App />);
|
||||
createRoot(document.getElementById('root')).render(
|
||||
<StrictMode>
|
||||
<QueryClientProvider client={ queryClient }>
|
||||
<ErrorBoundary
|
||||
fallbackRender={ ({ error }) => (
|
||||
<LoadingView
|
||||
isError={ true }
|
||||
message={ `Something went wrong.\n${ (error as Error)?.message ?? 'Unknown error' }` }
|
||||
homeUrl={ window.location.origin + '/' } />
|
||||
) }>
|
||||
<Suspense fallback={ <LoadingView message="Loading…" /> }>
|
||||
<App />
|
||||
</Suspense>
|
||||
</ErrorBoundary>
|
||||
</QueryClientProvider>
|
||||
</StrictMode>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user