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
+1 -1
View File
@@ -1,4 +1,4 @@
import React, { Fragment } from 'react'
import React from 'react'
import { Loading, useGetOne } from 'react-admin'
import { Card, CardContent, CardMedia, Typography } from '@material-ui/core'
import { subsonicUrl } from '../subsonic'
+2 -2
View File
@@ -32,8 +32,8 @@ const AlbumSongList = (props) => {
total={total}
primaryText={(r) => (
<>
<PlayButton record={r} />
<PlayButton record={r} action={addTrack} icon={<AddIcon />} />
<PlayButton action={setTrack(r)} />
<PlayButton action={addTrack(r)} icon={<AddIcon />} />
{trackName(r)}
</>
)}