import { LogIn } from "./components/LogIn/LogIn"; import { Navigate, Route, RouteProps, Routes } from "react-router"; import { SignUp } from "./components/SignUp/SignUp"; import { Home } from "./components/Home/Home"; import { CreateFlight } from "./components/CreateFlight/CreateFlight"; import { Button } from "antd"; import useAuth, { AuthProvider } from "./useAuth"; import { EditFlight } from "./components/CreateFlight/EditFlight"; function Router() { const { user, logout, isAirline, isAdmin } = useAuth(); return (