diff --git a/src/components/Authorization/Authorization.tsx b/src/components/Authorization/Authorization.tsx index cfe2ea8f8f01dc5709d6c2c03930714bead84053..6645687eb3d0ac4091df081cc62047ee51f71ca4 100644 --- a/src/components/Authorization/Authorization.tsx +++ b/src/components/Authorization/Authorization.tsx @@ -18,9 +18,7 @@ interface WithAuthProps { allowedRoles: string[]; } -interface Props extends WithAuthProps { - children: React.ReactNode; -} +// FIX: Sometimes the login page is displayed the circle rather than the login page. /* eslint-disable react/jsx-props-no-spreading */ /** @@ -42,7 +40,7 @@ export const withAuthorization = <T extends WithAuthProps = WithAuthProps>( console.log(`ROLE ${role} AUTH ${isAuth}`); /* eslint-disable no-nested-ternary */ - return typeof isAuth === null || role === null ? ( + return typeof isAuth === null && role === null ? ( <BlurCircular /> ) : // props comes afterwards so the can override the default ones. allowedRoles.includes(role) && isAuth ? (