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.IMusicSheetItemBase; 10} 11 12export default function TopListItem(props: ITopListResultsProps) { 13 const {pluginHash, topListItem} = props; 14 const navigate = useNavigate(); 15 16 return ( 17 <ListItem 18 withHorizontalPadding 19 onPress={() => { 20 navigate(ROUTE_PATH.TOP_LIST_DETAIL, { 21 pluginHash: pluginHash, 22 topList: topListItem, 23 }); 24 }}> 25 <ListItem.ListItemImage 26 uri={topListItem?.coverImg} 27 fallbackImg={ImgAsset.albumDefault} 28 /> 29 <ListItem.Content 30 title={topListItem.title} 31 description={`${topListItem.description ?? ''}`} 32 /> 33 </ListItem> 34 ); 35} 36