Sven Czarnian 2 лет назад
Родитель
Сommit
e221e0156b
2 измененных файлов с 8 добавлено и 7 удалено
  1. 1 7
      src/contexts/authcontext.tsx
  2. 7 0
      src/types/index.ts

+ 1 - 7
src/contexts/authcontext.tsx

@@ -2,13 +2,7 @@ import axios from 'axios';
 import { createContext, Dispatch, SetStateAction, useEffect, useState } from 'react';
 import { useNavigate } from 'react-router-dom';
 import { Configuration } from '../services';
-
-export interface User {
-  vatsimId: string;
-  fullName: string;
-  administrator: boolean;
-  airportConfigurationAccess: string[];
-};
+import { User } from '../types';
 
 const AuthContext = createContext<{
   auth: { valid: boolean; user: User };

+ 7 - 0
src/types/index.ts

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