move the auth state to the types

This commit is contained in:
Sven Czarnian committed 2022-11-04 21:21:55 +01:00
1 parent 6accc3ef06
commit 6be1bf0f43
2 files changed
+6 -6

No files matched your search

+1 -6
View File
@@ -1,12 +1,7 @@
import { createContext, Dispatch, SetStateAction, useEffect, useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { Auth } from '../services';
import { User } from '../types';
export interface IAuthState {
valid: boolean,
user: User,
};
import { IAuthState } from '../types';
const InitialAuthState: IAuthState = {
valid: false,
+5
View File
@@ -10,3 +10,8 @@ export interface User {
administrator: boolean;
airportConfigurationAccess: string[];
};
export interface IAuthState {
valid: boolean,
user: User,
};