From dbb38d5deaf6998bcf774661051f47ee862c2e90 Mon Sep 17 00:00:00 2001 From: Alberto Defendi <1369-ahl-berto@users.noreply.gitlab.inf.unibz.it> Date: Thu, 20 May 2021 12:08:44 +0200 Subject: [PATCH] Insert isAuthenticated flag. --- src/components/AuthUser/AuthContext.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/AuthUser/AuthContext.tsx b/src/components/AuthUser/AuthContext.tsx index b4418b9..584aeb6 100644 --- a/src/components/AuthUser/AuthContext.tsx +++ b/src/components/AuthUser/AuthContext.tsx @@ -3,12 +3,18 @@ import { createContext } from 'react'; export type AuthData = { role: string; + isAuth: boolean; setRole: (role: string) => void; + setIsAuth: (state: boolean) => void; }; export const AuthContext = createContext<AuthData>({ role: Roles.visitor, + isAuth: false, setRole: () => { // Do nothing }, + setIsAuth: () => { + // Do nothing + }, }); -- GitLab