import { Navigate, Route, Routes } from 'react-router-dom';

import { Error404 } from '@/errors';
import { SeasonDetailPage } from './SeasonDetailPage';
import { SeasonsPage } from './SeasonPage';

export const SeasonRoutes = () => {
  return (
    <Routes>
      <Route path="/" element={<Navigate to="all" replace />} />
      <Route path="all" element={<SeasonsPage />} />
      <Route path=":SeasonId/*" element={<SeasonDetailPage />} />
      <Route path="*" element={<Error404 />} />
    </Routes>
  );
};
