move the auth state to the types
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -10,3 +10,8 @@ export interface User {
|
||||
administrator: boolean;
|
||||
airportConfigurationAccess: string[];
|
||||
};
|
||||
|
||||
export interface IAuthState {
|
||||
valid: boolean,
|
||||
user: User,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user