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 { createContext, Dispatch, SetStateAction, useEffect, useState } from 'react'; | ||||||
| import { useNavigate } from 'react-router-dom'; | import { useNavigate } from 'react-router-dom'; | ||||||
| import { Auth } from '../services'; | import { Auth } from '../services'; | ||||||
| import { User } from '../types'; | import { IAuthState } from '../types'; | ||||||
|  |  | ||||||
| export interface IAuthState { |  | ||||||
|   valid: boolean, |  | ||||||
|   user: User, |  | ||||||
| }; |  | ||||||
|  |  | ||||||
| const InitialAuthState: IAuthState = { | const InitialAuthState: IAuthState = { | ||||||
|   valid: false, |   valid: false, | ||||||
|   | |||||||
| @@ -10,3 +10,8 @@ export interface User { | |||||||
|   administrator: boolean; |   administrator: boolean; | ||||||
|   airportConfigurationAccess: string[]; |   airportConfigurationAccess: string[]; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | export interface IAuthState { | ||||||
|  |   valid: boolean, | ||||||
|  |   user: User, | ||||||
|  | }; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user