Prevent sending requests that are known to fail
In case it's still unknown if auth is set up on the server, only the initial request to detect this should be sent. Since all other requests will also just fail, they should be blocked until the auth initialization is completed. While the access token is getting refreshed, no request will succeed since the access token is expired; thus, they should not be sent.
This commit is contained in:
18
src/App.tsx
18
src/App.tsx
@@ -298,16 +298,16 @@ export const App: React.FC = () => (
|
||||
<ScrollToTop />
|
||||
<GlobalDialog />
|
||||
|
||||
<ServerUpdateChecker />
|
||||
<WebUIUpdateChecker />
|
||||
<InitialBackgroundRequests />
|
||||
<BackgroundSubscriptions />
|
||||
|
||||
<ReactRouterSetter />
|
||||
|
||||
<CssBaseline enableColorScheme />
|
||||
|
||||
<AuthGuard>
|
||||
<ServerUpdateChecker />
|
||||
<WebUIUpdateChecker />
|
||||
<InitialBackgroundRequests />
|
||||
<BackgroundSubscriptions />
|
||||
|
||||
<ReactRouterSetter />
|
||||
|
||||
<CssBaseline enableColorScheme />
|
||||
|
||||
<Box sx={{ display: 'flex' }}>
|
||||
<Box sx={{ flexShrink: 0, position: 'relative', height: '100vh' }}>
|
||||
<DefaultNavBar />
|
||||
|
||||
Reference in New Issue
Block a user