define the user in the types
This commit is contained in:
@@ -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 };
|
||||||
|
|||||||
@@ -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[];
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user