diff --git a/src/components/api/PrivateRoute/PrivateRoute.tsx b/src/components/api/PrivateRoute/PrivateRoute.tsx index e313633e1f1acf9ee7864f2ecd4ef5ca15d07092..7c3256102d3fb2b7c2f131e4219276a3662fa497 100644 --- a/src/components/api/PrivateRoute/PrivateRoute.tsx +++ b/src/components/api/PrivateRoute/PrivateRoute.tsx @@ -18,9 +18,8 @@ export const PrivateRoute = ({ path, requiredRoles, }: Props): JSX.Element => { - const isAuthed = false; + const isAuthed = true; const userHasRequiredRole = requiredRoles.includes('admin'); - const message = userHasRequiredRole ? 'Please log in to view this page' : 'Your role is not allowed'; @@ -29,7 +28,7 @@ export const PrivateRoute = ({ exact={false} path={path} render={(props: RouteProps) => - isAuthed ? ( + isAuthed && userHasRequiredRole ? ( <Component {...props} /> ) : ( <Redirect