import { Header } from '@components/Header';
import { Navigate } from 'react-router';
import { useUserContext } from '@components/context/UserContext.tsx';
import { AirportTable } from '@components/AirportTable';
import { AirportDrop } from '@components/AirportDrop';

export function Administration() {
  const { user } = useUserContext();

  if (user == undefined) {
    return <Navigate to={'/'} />;
  }

  return (
    <>
      <Header />
      <AirportTable />
      <AirportDrop />
    </>
  );
}
