define the user in the types

Este commit está contenido en:
Sven Czarnian
2022-11-04 13:14:19 +01:00
padre d412abb60e
commit e221e0156b
Se han modificado 2 ficheros con 8 adiciones y 7 borrados

Ver fichero

@@ -2,13 +2,7 @@ import axios from 'axios';
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 { Configuration } from '../services'; import { Configuration } from '../services';
import { User } from '../types';
export interface User {
vatsimId: string;
fullName: string;
administrator: boolean;
airportConfigurationAccess: string[];
};
const AuthContext = createContext<{ const AuthContext = createContext<{
auth: { valid: boolean; user: User }; auth: { valid: boolean; user: User };

Ver fichero

@@ -3,3 +3,10 @@ export interface AirportOverview {
name: string; name: string;
flightInformationRegion: string; flightInformationRegion: string;
}; };
export interface User {
vatsimId: string;
fullName: string;
administrator: boolean;
airportConfigurationAccess: string[];
};