Fix artist/album artist cells (#117)

This commit is contained in:
jeffvli 2023-06-11 23:27:50 -07:00
parent 0e9a77ffe0
commit a3a84766e4
2 changed files with 44 additions and 24 deletions

View file

@ -38,18 +38,28 @@ export const AlbumArtistCell = ({ value, data }: ICellRendererParams) => {
,
</Text>
)}{' '}
<Text
$link
$secondary
component={Link}
overflow="hidden"
size="md"
to={generatePath(AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL, {
albumArtistId: item.id,
})}
>
{item.name || '—'}
</Text>
{item.id ? (
<Text
$link
$secondary
component={Link}
overflow="hidden"
size="md"
to={generatePath(AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL, {
albumArtistId: item.id,
})}
>
{item.name || '—'}
</Text>
) : (
<Text
$secondary
overflow="hidden"
size="md"
>
{item.name || '—'}
</Text>
)}
</React.Fragment>
))}
</Text>

View file

@ -38,18 +38,28 @@ export const ArtistCell = ({ value, data }: ICellRendererParams) => {
,
</Text>
)}{' '}
<Text
$link
$secondary
component={Link}
overflow="hidden"
size="md"
to={generatePath(AppRoute.LIBRARY_ARTISTS_DETAIL, {
artistId: item.id,
})}
>
{item.name || '—'}
</Text>
{item.id ? (
<Text
$link
$secondary
component={Link}
overflow="hidden"
size="md"
to={generatePath(AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL, {
albumArtistId: item.id,
})}
>
{item.name || '—'}
</Text>
) : (
<Text
$secondary
overflow="hidden"
size="md"
>
{item.name || '—'}
</Text>
)}
</React.Fragment>
))}
</Text>