refactor: simplify PlayButton usage

This commit is contained in:
Deluan
2020-02-07 16:38:01 -05:00
parent a50735a94c
commit 8f0c07d29f
4 changed files with 12 additions and 25 deletions
+6 -12
View File
@@ -66,21 +66,15 @@ const SongList = (props) => {
>
{isXsmall ? (
<SimpleList
primaryText={(record) => (
primaryText={(r) => (
<>
<PlayButton record={record} />
<PlayButton
record={record}
action={addTrack}
icon={<AddIcon />}
/>
{record.title}
<PlayButton action={setTrack(r)} />
<PlayButton action={addTrack(r)} icon={<AddIcon />} />
{r.title}
</>
)}
secondaryText={(record) => record.artist}
tertiaryText={(record) => (
<DurationField record={record} source={'duration'} />
)}
secondaryText={(r) => r.artist}
tertiaryText={(r) => <DurationField record={r} source={'duration'} />}
linkType={(id, basePath, record) => dispatch(setTrack(record))}
/>
) : (