Skip to content
Snippets Groups Projects
Verified Commit dbb38d5d authored by Defendi Alberto's avatar Defendi Alberto
Browse files

Insert isAuthenticated flag.

parent 2398a1eb
No related branches found
No related tags found
2 merge requests!56Refined auth flow and new website pages.,!44New route type (RestrictedRoute) and better api calls.
...@@ -3,12 +3,18 @@ import { createContext } from 'react'; ...@@ -3,12 +3,18 @@ import { createContext } from 'react';
export type AuthData = { export type AuthData = {
role: string; role: string;
isAuth: boolean;
setRole: (role: string) => void; setRole: (role: string) => void;
setIsAuth: (state: boolean) => void;
}; };
export const AuthContext = createContext<AuthData>({ export const AuthContext = createContext<AuthData>({
role: Roles.visitor, role: Roles.visitor,
isAuth: false,
setRole: () => { setRole: () => {
// Do nothing // Do nothing
}, },
setIsAuth: () => {
// Do nothing
},
}); });
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment