Disable link from invalid artist on table cells (#117)
This commit is contained in:
parent
736945d6ef
commit
8f7e6a5222
1 changed files with 24 additions and 13 deletions
|
@ -116,19 +116,30 @@ export const CombinedTitleCell = ({ value, rowIndex, node }: ICellRendererParams
|
||||||
artists.map((artist: Artist | AlbumArtist, index: number) => (
|
artists.map((artist: Artist | AlbumArtist, index: number) => (
|
||||||
<React.Fragment key={`queue-${rowIndex}-artist-${artist.id}`}>
|
<React.Fragment key={`queue-${rowIndex}-artist-${artist.id}`}>
|
||||||
{index > 0 ? ', ' : null}
|
{index > 0 ? ', ' : null}
|
||||||
<Text
|
{artist.id ? (
|
||||||
$link
|
<Text
|
||||||
$secondary
|
$secondary
|
||||||
component={Link}
|
$link={artist.id !== undefined}
|
||||||
overflow="hidden"
|
component={Link}
|
||||||
size="md"
|
overflow="hidden"
|
||||||
sx={{ width: 'fit-content' }}
|
size="md"
|
||||||
to={generatePath(AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL, {
|
sx={{ width: 'fit-content' }}
|
||||||
albumArtistId: artist.id,
|
to={generatePath(AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL, {
|
||||||
})}
|
albumArtistId: artist.id,
|
||||||
>
|
})}
|
||||||
{artist.name}
|
>
|
||||||
</Text>
|
{artist.name}
|
||||||
|
</Text>
|
||||||
|
) : (
|
||||||
|
<Text
|
||||||
|
$secondary
|
||||||
|
overflow="hidden"
|
||||||
|
size="md"
|
||||||
|
sx={{ width: 'fit-content' }}
|
||||||
|
>
|
||||||
|
{artist.name}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
))
|
))
|
||||||
) : (
|
) : (
|
||||||
|
|
Reference in a new issue