Skip to content
Snippets Groups Projects
Commit 08b165dc authored by Hugo Brua's avatar Hugo Brua
Browse files

:pencil: clean test login persistance

parent 066b91db
Branches
4 merge requests!6Finalisation du panier,!5Stock,!3Develop,!2:sparkless: add auth persistance
This commit is part of merge request !3. Comments created here will be created in the context of that merge request.
......@@ -10,7 +10,7 @@ function RequireAuth({ children }: { children: JSX.Element }) {
let auth = useAuth();
let location = useLocation();
if (read_cookie('user') == false && !auth.user) {
if (read_cookie('user').length === 0 && !auth.user) {
// Redirect them to the /login page, but save the current location they were
// trying to go to when they were redirected. This allows us to send them
// along to that page after they login, which is a nicer user experience
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment