mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-14 20:40:21 +02:00
reimplement genre detail route
This commit is contained in:
@@ -12,7 +12,7 @@ export const getTitlePath = (itemType: LibraryItem, id: string) => {
|
||||
case LibraryItem.ARTIST:
|
||||
return generatePath(AppRoute.LIBRARY_ARTISTS_DETAIL, { artistId: id });
|
||||
case LibraryItem.GENRE:
|
||||
return generatePath(AppRoute.LIBRARY_GENRES_ALBUMS, { genreId: id });
|
||||
return generatePath(AppRoute.LIBRARY_GENRES_DETAIL, { genreId: id });
|
||||
case LibraryItem.PLAYLIST:
|
||||
return generatePath(AppRoute.PLAYLISTS_DETAIL_SONGS, { playlistId: id });
|
||||
default:
|
||||
|
||||
@@ -26,7 +26,7 @@ const GenreBadgeColumn = (props: ItemTableListInnerColumn) => {
|
||||
if (!row) return [];
|
||||
return row.map((genre) => {
|
||||
const { color, isLight } = stringToColor(genre.name);
|
||||
const path = generatePath(AppRoute.LIBRARY_GENRES_ALBUMS, { genreId: genre.id });
|
||||
const path = generatePath(AppRoute.LIBRARY_GENRES_DETAIL, { genreId: genre.id });
|
||||
return { ...genre, color, isLight, path };
|
||||
});
|
||||
}, [row]);
|
||||
|
||||
@@ -22,7 +22,7 @@ const GenreColumn = (props: ItemTableListInnerColumn) => {
|
||||
const genres = useMemo(() => {
|
||||
if (!row) return [];
|
||||
return row.map((genre) => {
|
||||
const path = generatePath(AppRoute.LIBRARY_GENRES_ALBUMS, {
|
||||
const path = generatePath(AppRoute.LIBRARY_GENRES_DETAIL, {
|
||||
genreId: genre.id,
|
||||
});
|
||||
return { ...genre, path };
|
||||
|
||||
Reference in New Issue
Block a user