move the auth state to the types

Šī revīzija ir iekļauta:
Sven Czarnian
2022-11-04 21:21:55 +01:00
vecāks 6accc3ef06
revīzija 6be1bf0f43
2 mainīti faili ar 6 papildinājumiem un 6 dzēšanām

Parādīt failu

@@ -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,

Parādīt failu

@@ -10,3 +10,8 @@ export interface User {
administrator: boolean;
airportConfigurationAccess: string[];
};
export interface IAuthState {
valid: boolean,
user: User,
};