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

import { Error404 } from '@/errors';
import { AlbumDetailPage } from '@/scene/album/AlbumDetailPage';
import { AlbumsPage } from '@/scene/album/AlbumsPage';

export const AlbumRoutes = () => {
  return (
    <Routes>
      <Route path="/" element={<Navigate to="all" replace />} />
      <Route path="all" element={<AlbumsPage />} />
      <Route path=":albumId/*" element={<AlbumDetailPage />} />
      <Route path="*" element={<Error404 />} />
    </Routes>
  );
};
