1import React from 'react'; 2import {ROUTE_PATH, useNavigate} from '@/entry/router'; 3import ListItem from '@/components/base/listItem'; 4import {ImgAsset} from '@/constants/assetsConst'; 5import TitleAndTag from './titleAndTag'; 6 7interface IAlbumResultsProps { 8 albumItem: IAlbum.IAlbumItem; 9} 10 11export default function AlbumItem(props: IAlbumResultsProps) { 12 const {albumItem} = props; 13 const navigate = useNavigate(); 14 15 return ( 16 <ListItem 17 withHorizonalPadding 18 heightType="big" 19 onPress={() => { 20 navigate(ROUTE_PATH.ALBUM_DETAIL, { 21 albumItem, 22 }); 23 }}> 24 <ListItem.ListItemImage 25 uri={albumItem.artwork} 26 fallbackImg={ImgAsset.albumDefault} 27 /> 28 <ListItem.Content 29 title={ 30 <TitleAndTag 31 title={albumItem.title} 32 tag={albumItem.platform} 33 /> 34 } 35 description={`${albumItem.artist ?? ''} ${ 36 albumItem.date ?? '' 37 }`} 38 /> 39 </ListItem> 40 // <ListItem 41 // left={{ 42 // artwork: albumItem.artwork, 43 // fallback: ImgAsset.albumDefault, 44 // }} 45 // title={albumItem.title} 46 // desc={`${albumItem.artist ?? ''} ${albumItem.date ?? ''}`} 47 // tag={albumItem.platform} 48 // onPress={() => { 49 // navigate(ROUTE_PATH.ALBUM_DETAIL, { 50 // albumItem, 51 // }); 52 // }} 53 // /> 54 ); 55} 56