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

import { Error404 } from '@/errors';
import { MediaSelectionPage } from './MediaSelectionPage';
import { MediasStartLetterDetailPage } from './MediaStartLetterDetailPage';

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