Skip to content

Commit

Permalink
fix(loading): quit loading component from private routes
Browse files Browse the repository at this point in the history
  • Loading branch information
imjulianeral committed Sep 7, 2021
1 parent aa3e4bc commit 7860b6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/NextShield.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function NextShield<
if (
((isLoading || !isAuth) && pathIsPrivate) ||
((isLoading || isAuth) && pathIsPublic) ||
((isLoading || userRole) && (!pathIsAuthorized || !pathIsHybrid)) ||
((isLoading || userRole) && !pathIsAuthorized) ||
(isLoading && pathIsHybrid)
)
return <>{LoadingComponent}</>
Expand Down

0 comments on commit 7860b6f

Please sign in to comment.