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>
)}{' '} )}{' '}
<Text {item.id ? (
$link <Text
$secondary $link
component={Link} $secondary
overflow="hidden" component={Link}
size="md" overflow="hidden"
to={generatePath(AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL, { size="md"
albumArtistId: item.id, to={generatePath(AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL, {
})} albumArtistId: item.id,
> })}
{item.name || '—'} >
</Text> {item.name || '—'}
</Text>
) : (
<Text
$secondary
overflow="hidden"
size="md"
>
{item.name || '—'}
</Text>
)}
</React.Fragment> </React.Fragment>
))} ))}
</Text> </Text>

View file

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