diff --git a/ui/src/album/AlbumDetails.js b/ui/src/album/AlbumDetails.js index 278dd8f95..e80f40e18 100644 --- a/ui/src/album/AlbumDetails.js +++ b/ui/src/album/AlbumDetails.js @@ -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' diff --git a/ui/src/album/AlbumSongList.js b/ui/src/album/AlbumSongList.js index f965b45d1..35cd00625 100644 --- a/ui/src/album/AlbumSongList.js +++ b/ui/src/album/AlbumSongList.js @@ -32,8 +32,8 @@ const AlbumSongList = (props) => { total={total} primaryText={(r) => ( <> - - } /> + + } /> {trackName(r)} )} diff --git a/ui/src/common/PlayButton.js b/ui/src/common/PlayButton.js index e3760cf2f..3549a852e 100644 --- a/ui/src/common/PlayButton.js +++ b/ui/src/common/PlayButton.js @@ -3,23 +3,17 @@ import PropTypes from 'prop-types' import PlayArrowIcon from '@material-ui/icons/PlayArrow' import { IconButton } from '@material-ui/core' import { useDispatch } from 'react-redux' -import { setTrack } from '../player' const defaultIcon = -const PlayButton = ({ - record, - icon = defaultIcon, - action = setTrack, - ...rest -}) => { +const PlayButton = ({ icon = defaultIcon, action, ...rest }) => { const dispatch = useDispatch() return ( { e.stopPropagation() - dispatch(action(record)) + dispatch(action) }} {...rest} size={'small'} @@ -30,8 +24,7 @@ const PlayButton = ({ } PlayButton.propTypes = { - record: PropTypes.any, icon: PropTypes.element, - action: PropTypes.func + action: PropTypes.object } export default PlayButton diff --git a/ui/src/song/SongList.js b/ui/src/song/SongList.js index f18e3d351..cd58b53e8 100644 --- a/ui/src/song/SongList.js +++ b/ui/src/song/SongList.js @@ -66,21 +66,15 @@ const SongList = (props) => { > {isXsmall ? ( ( + primaryText={(r) => ( <> - - } - /> - {record.title} + + } /> + {r.title} )} - secondaryText={(record) => record.artist} - tertiaryText={(record) => ( - - )} + secondaryText={(r) => r.artist} + tertiaryText={(r) => } linkType={(id, basePath, record) => dispatch(setTrack(record))} /> ) : (