define the user in the types

This commit is contained in:
Sven Czarnian
2022-11-04 13:14:19 +01:00
parent d412abb60e
commit e221e0156b
2 changed files with 8 additions and 7 deletions

View File

@@ -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 };

View File

@@ -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[];
};