Skip to content
Snippets Groups Projects

:sparkless: add auth persistance

Merged BRUA HUGO requested to merge persistance into develop
Viewing commit 6995003b
Prev
Show latest version
3 files
+ 32
30
Preferences
Compare changes
Files
3
+ 1
1
@@ -6,7 +6,7 @@ import { read_cookie } from 'sfcookies';
function useAuth() {
let auth = React.useContext(AuthContext);
if(read_cookie('user').length !== 0)
if(!auth.user && read_cookie('user').length !== 0)
auth.user = read_cookie('user');
return auth;