fix: eslint

feature/artists
mackt 7 months ago
parent ba8514d6a2
commit f9ce713d1e

@ -66,7 +66,7 @@ export default function SongCardList({ height, listInfo, songList, className, co
setAudioId(id); setAudioId(id);
}; };
function Item({ index, style }: { index: number; style: React.CSSProperties }) { function Item({ index }: { index: number }) {
const item = songList[index]; const item = songList[index];
return ( return (
<div> <div>
@ -77,7 +77,6 @@ export default function SongCardList({ height, listInfo, songList, className, co
showEq={item?.id === audioId} showEq={item?.id === audioId}
onPlay={handlePlayList} onPlay={handlePlayList}
showCollect={collectType === 'always' || (collectType === 'playing' && item.id === audioId)} showCollect={collectType === 'always' || (collectType === 'playing' && item.id === audioId)}
style={style}
/> />
</div> </div>
); );

@ -9,26 +9,13 @@ interface Props extends SongInfo {
showCollect: boolean; showCollect: boolean;
/** 显示均衡器效果 */ /** 显示均衡器效果 */
showEq: boolean; showEq: boolean;
style: React.CSSProperties;
onPlay: (id: string) => void; onPlay: (id: string) => void;
} }
export default function SongCard({ export default function SongCard({ playState, id, title, pic, artist, haveCollect, duration, showEq, onPlay }: Props) {
playState,
id,
title,
pic,
artist,
haveCollect,
duration,
showEq,
onPlay,
style,
}: Props) {
return ( return (
<div <div
className="flex flex-row items-center justify-between w-full h-[72px] my-[3px] py-[12px] px-[18px] rounded-[3px] hover:bg-[#f2f3f7] group cursor-pointer" className="flex flex-row items-center justify-between w-full h-[72px] my-[3px] py-[12px] px-[18px] rounded-[3px] hover:bg-[#f2f3f7] group cursor-pointer"
style={style}
onClick={() => onPlay(id)} onClick={() => onPlay(id)}
> >
{/* left */} {/* left */}

Loading…
Cancel
Save