Untitled

 avatar
unknown
javascript
2 years ago
269 B
4
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...