Add genre list route and implementation

This commit is contained in:
jeffvli 2023-08-03 16:58:35 -07:00
parent f6d74ce9c3
commit 5896d886d7
7 changed files with 126 additions and 35 deletions

View file

@ -105,11 +105,21 @@ export const AppRouter = () => {
errorElement={<RouteErrorBoundary />}
path={AppRoute.NOW_PLAYING}
/>
<Route
element={<GenreListRoute />}
errorElement={<RouteErrorBoundary />}
path={AppRoute.LIBRARY_GENRES}
/>
<Route path={AppRoute.LIBRARY_GENRES}>
<Route
index
element={<GenreListRoute />}
errorElement={<RouteErrorBoundary />}
/>
<Route
element={<AlbumListRoute />}
path={AppRoute.LIBRARY_GENRES_ALBUMS}
/>
<Route
element={<SongListRoute />}
path={AppRoute.LIBRARY_GENRES_SONGS}
/>
</Route>
<Route
element={<AlbumListRoute />}
errorElement={<RouteErrorBoundary />}

View file

@ -13,6 +13,8 @@ export enum AppRoute {
LIBRARY_ARTISTS_DETAIL = '/library/artists/:artistId',
LIBRARY_FOLDERS = '/library/folders',
LIBRARY_GENRES = '/library/genres',
LIBRARY_GENRES_ALBUMS = '/library/genres/:genreId/albums',
LIBRARY_GENRES_SONGS = '/library/genres/:genreId/songs',
LIBRARY_SONGS = '/library/songs',
NOW_PLAYING = '/now-playing',
PLAYING = '/playing',