Skip to content
Snippets Groups Projects
Commit 80e6df8c authored by Hugo Brua's avatar Hugo Brua Committed by LAFORÊT Nicolas
Browse files

:pencil: clean test login persistance

parent e17c304f
Branches
1 merge request!4Add CI deployment
......@@ -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