update title columns to use links

This commit is contained in:
jeffvli
2025-10-10 18:38:24 -07:00
parent f7f1d5f54d
commit 34bd9d93ad
7 changed files with 101 additions and 22 deletions
@@ -0,0 +1,19 @@
import { generatePath } from 'react-router';
import { AppRoute } from '/@/renderer/router/routes';
import { LibraryItem } from '/@/shared/types/domain-types';
export const getTitlePath = (itemType: LibraryItem, id: string) => {
switch (itemType) {
case LibraryItem.ALBUM:
return generatePath(AppRoute.LIBRARY_ALBUMS_DETAIL, { albumId: id });
case LibraryItem.ALBUM_ARTIST:
return generatePath(AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL, { albumArtistId: id });
case LibraryItem.ARTIST:
return generatePath(AppRoute.LIBRARY_ARTISTS_DETAIL, { artistId: id });
case LibraryItem.GENRE:
return generatePath(AppRoute.LIBRARY_GENRES, { genreId: id });
default:
return null;
}
};