1import React from 'react'; 2// import {ROUTE_PATH, useNavigate} from '@/entry/router'; 3import ListItem from '@/components/base/listItem'; 4import {ImgAsset} from '@/constants/assetsConst'; 5import {ROUTE_PATH, useNavigate} from '@/entry/router'; 6 7interface ITopListResultsProps { 8 pluginHash: string; 9 topListItem: IMusic.IMusicTopListItem; 10} 11 12export default function TopListItem(props: ITopListResultsProps) { 13 const {pluginHash, topListItem} = props; 14 const navigate = useNavigate(); 15 16 return ( 17 <ListItem 18 left={{ 19 artwork: topListItem?.coverImg, 20 fallback: ImgAsset.albumDefault, 21 }} 22 title={topListItem.title} 23 desc={`${topListItem.description ?? ''}`} 24 onPress={() => { 25 navigate(ROUTE_PATH.TOP_LIST_DETAIL, { 26 pluginHash: pluginHash, 27 topList: topListItem, 28 }); 29 }} 30 /> 31 ); 32} 33