Skip to content

Commit

Permalink
fix(hybridroutes): loadingComponent disapears properly when accessing…
Browse files Browse the repository at this point in the history
… a hybrid route with RBAC user
  • Loading branch information
imjulianeral committed Sep 8, 2021
1 parent 7860b6f commit 2955f58
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) ||
((isLoading || userRole) && !pathIsAuthorized && !pathIsHybrid) ||
(isLoading && pathIsHybrid)
)
return <>{LoadingComponent}</>
Expand Down

0 comments on commit 2955f58

Please sign in to comment.