Untitled
Anonymous
javascript
03/18/2023 2:52 PM
360 B
15
Indexable
const PrivateRoute = ({ children }: PropsWithChildren) => {
const accessToken = window.localStorage.getItem('Access token');
if (!accessToken) {
return <EvNavigate to={RoutePath.AuthLogin} replace state={location} />;
}
return children;
};Editor is loading...