From fc08e172506efa7155a7f3b14ab3978a40fe67b3 Mon Sep 17 00:00:00 2001 From: Alberto Defendi <1369-ahl-berto@users.noreply.gitlab.inf.unibz.it> Date: Thu, 27 May 2021 14:37:20 +0200 Subject: [PATCH] Null isAuth signals no data fetched. --- src/components/AuthUser/AuthContext.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/AuthUser/AuthContext.tsx b/src/components/AuthUser/AuthContext.tsx index 584aeb6..a945869 100644 --- a/src/components/AuthUser/AuthContext.tsx +++ b/src/components/AuthUser/AuthContext.tsx @@ -3,9 +3,9 @@ import { createContext } from 'react'; export type AuthData = { role: string; - isAuth: boolean; + isAuth: boolean | null; setRole: (role: string) => void; - setIsAuth: (state: boolean) => void; + setIsAuth: (state: boolean | null) => void; }; export const AuthContext = createContext<AuthData>({ -- GitLab