Set artist links to use outline button
This commit is contained in:
parent
1eed26abab
commit
ef4cdfa028
1 changed files with 13 additions and 24 deletions
|
@ -3,7 +3,7 @@ import { forwardRef, Fragment, Ref } from 'react';
|
||||||
import { generatePath, useParams } from 'react-router';
|
import { generatePath, useParams } from 'react-router';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { LibraryItem, ServerType } from '/@/renderer/api/types';
|
import { LibraryItem, ServerType } from '/@/renderer/api/types';
|
||||||
import { Rating, Text } from '/@/renderer/components';
|
import { Button, Rating, Text } from '/@/renderer/components';
|
||||||
import { useAlbumDetail } from '/@/renderer/features/albums/queries/album-detail-query';
|
import { useAlbumDetail } from '/@/renderer/features/albums/queries/album-detail-query';
|
||||||
import { LibraryHeader, useUpdateRating } from '/@/renderer/features/shared';
|
import { LibraryHeader, useUpdateRating } from '/@/renderer/features/shared';
|
||||||
import { useContainerQuery } from '/@/renderer/hooks';
|
import { useContainerQuery } from '/@/renderer/hooks';
|
||||||
|
@ -104,29 +104,18 @@ export const AlbumDetailHeader = forwardRef(
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{detailQuery?.data?.albumArtists.map((artist, index) => (
|
{detailQuery?.data?.albumArtists.map((artist) => (
|
||||||
<Fragment key={`artist-${artist.id}`}>
|
<Button
|
||||||
{index > 0 && (
|
key={`artist-${artist.id}`}
|
||||||
<Text
|
component={Link}
|
||||||
sx={{
|
size="sm"
|
||||||
display: 'inline-block',
|
to={generatePath(AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL, {
|
||||||
padding: '0 0.5rem',
|
albumArtistId: artist.id,
|
||||||
}}
|
})}
|
||||||
>
|
variant="outline"
|
||||||
•
|
>
|
||||||
</Text>
|
{artist.name}
|
||||||
)}
|
</Button>
|
||||||
<Text
|
|
||||||
$link
|
|
||||||
component={Link}
|
|
||||||
to={generatePath(AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL, {
|
|
||||||
albumArtistId: artist.id,
|
|
||||||
})}
|
|
||||||
weight={600}
|
|
||||||
>
|
|
||||||
{artist.name}
|
|
||||||
</Text>
|
|
||||||
</Fragment>
|
|
||||||
))}
|
))}
|
||||||
</Group>
|
</Group>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
Reference in a new issue