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

import { Error404 } from '@/errors';
import { TrackSelectionPage } from '@/scene/track/TrackSelectionPage';
import { TracksStartLetterDetailPage } from '@/scene/track/TracksStartLetterDetailPage';

export const TrackRoutes = () => {
  return (
    <Routes>
      <Route path="/" element={<Navigate to="all" replace />} />
      <Route path="all" element={<TrackSelectionPage />} />
      <Route path=":startLetter" element={<TracksStartLetterDetailPage />} />
      <Route path="*" element={<Error404 />} />
    </Routes>
  );
};
