mirror of
https://github.com/suitenumerique/docs
synced 2026-04-21 13:37:20 +00:00
🐛(frontend) fix app shalow reload
The app was doing a shalow reload when user was coming from another tab and the user data was staled. We stop to block the app during the loading state, depend the response the app will manage correctly its states.
This commit is contained in:
parent
5a687799d5
commit
67b9324c83
2 changed files with 7 additions and 10 deletions
11
CHANGELOG.md
11
CHANGELOG.md
|
|
@ -6,16 +6,17 @@ and this project adheres to
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
|
||||
- ♿️(frontend) structure correctly 5xx error alerts #2128
|
||||
- ♿️(frontend) make doc search result labels uniquely identifiable #2212
|
||||
|
||||
### Fixed
|
||||
|
||||
- 🚸(frontend) redirect on current url tab after 401 #2197
|
||||
- 🐛(frontend) abort check media status unmount #2194
|
||||
- ✨(backend) order pinned documents by last updated at #2028
|
||||
|
||||
### Changed
|
||||
|
||||
- ♿️(frontend) structure correctly 5xx error alerts #2128
|
||||
- ♿️(frontend) make doc search result labels uniquely identifiable #2212
|
||||
- 🐛(frontend) fix app shalow reload #2231
|
||||
|
||||
## [v4.8.6] - 2026-04-08
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ export const Auth = ({ children }: PropsWithChildren) => {
|
|||
const {
|
||||
isLoading: isAuthLoading,
|
||||
pathAllowed,
|
||||
isFetchedAfterMount,
|
||||
authenticated,
|
||||
fetchStatus,
|
||||
user,
|
||||
|
|
@ -104,10 +103,7 @@ export const Auth = ({ children }: PropsWithChildren) => {
|
|||
]);
|
||||
|
||||
const shouldShowLoader =
|
||||
(isLoading && !isFetchedAfterMount) ||
|
||||
isRedirecting ||
|
||||
(!authenticated && !pathAllowed) ||
|
||||
shouldTrySilentLogin;
|
||||
isRedirecting || (!authenticated && !pathAllowed) || shouldTrySilentLogin;
|
||||
|
||||
if (shouldShowLoader) {
|
||||
return <Loading $height="100vh" $width="100vw" />;
|
||||
|
|
|
|||
Loading…
Reference in a new issue