diff --git a/src/components/common/SongInfo.tsx b/src/components/common/SongInfo.tsx index ae4d367..3da05d6 100644 --- a/src/components/common/SongInfo.tsx +++ b/src/components/common/SongInfo.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import { IonModal, IonContent, - IonButton, IonIcon, IonList, IonItem, IonLabel + IonButton, IonIcon } from '@ionic/react'; import { add, heart, heartOutline, ban, checkmark, people @@ -11,7 +11,7 @@ import { selectIsAdmin, selectFavorites, selectSongs, selectQueue } from '../../ import { useActions } from '../../hooks/useActions'; import { useModal } from '../../hooks/useModalContext'; -import { ModalHeader } from './ModalHeader'; +import { ModalHeader, InfiniteScrollList, SongItem } from './index'; import { SongInfoDisplay } from './SongItem'; import type { Song, QueueItem } from '../../types'; @@ -152,24 +152,23 @@ const SongInfo: React.FC = ({ isOpen, onClose, song }) => { /> -
- {artistSongs.length > 0 ? ( - - {artistSongs.map((artistSong) => ( - - -
{artistSong.title}
-
{artistSong.path}
-
-
- ))} -
- ) : ( -
- No other songs found by this artist -
+ {}} + renderItem={(song) => ( + )} -
+ emptyTitle="No songs found" + emptyMessage="No other songs found by this artist" + />
diff --git a/src/features/Artists/Artists.tsx b/src/features/Artists/Artists.tsx index 5097dc0..1509b1c 100644 --- a/src/features/Artists/Artists.tsx +++ b/src/features/Artists/Artists.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; -import { IonSearchbar, IonModal, IonContent, IonItem } from '@ionic/react'; +import { IonSearchbar, IonModal, IonContent } from '@ionic/react'; import { list } from 'ionicons/icons'; -import { InfiniteScrollList, SongItem, ListItem, NumberDisplay, ModalHeader } from '../../components/common'; +import { InfiniteScrollList, SongItem, ListItem, ModalHeader } from '../../components/common'; import { useArtists } from '../../hooks'; import { useAppSelector } from '../../redux'; import { selectSongs } from '../../redux'; @@ -83,61 +83,23 @@ const Artists: React.FC = () => { -
- {}} - renderItem={(song, index) => ( - - {/* Number */} -
- -
- - {/* Song Item Content - placed directly after NumberDisplay like in ListItem */} -
-
- -
-
-
- )} - emptyTitle="No songs found" - emptyMessage="This artist has no songs in the catalog" - /> -
+ {}} + renderItem={(song) => ( + + )} + emptyTitle="No songs found" + emptyMessage="This artist has no songs in the catalog" + />