mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 13:48:02 +00:00
fix: 歌手页 & 歌手页链接 (#1434)
* fix: 禁止打开id为0的歌手页 * feat: 当歌手没有专辑时,不在歌手页中显示专辑 & 热门歌曲默认禁用滚动条 * fix * fix: 根据建议进行修改
This commit is contained in:
parent
36603dc3a0
commit
7ac084f73d
2 changed files with 15 additions and 11 deletions
|
|
@ -10,8 +10,8 @@ const ArtistInline = ({
|
|||
if (!artists) return <div></div>
|
||||
|
||||
const navigate = useNavigate()
|
||||
const handleClick = () => {
|
||||
disableLink ? null : navigate(`/artist/${artists[0].id}`)
|
||||
const handleClick = (id: number) => {
|
||||
id !== 0 && !disableLink && navigate(`/artist/${id}`)
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
@ -19,7 +19,7 @@ const ArtistInline = ({
|
|||
{artists.map((artist, index) => (
|
||||
<span key={`${artist.id}-${artist.name}`}>
|
||||
<span
|
||||
onClick={handleClick}
|
||||
onClick={() => handleClick(artist.id)}
|
||||
className={classNames({
|
||||
'hover:underline': !!artist.id && !disableLink,
|
||||
})}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue