Fix Share dialog titles for Album and Playlist
This commit is contained in:
@@ -37,7 +37,6 @@ const AlbumActions = ({
|
|||||||
ids,
|
ids,
|
||||||
data,
|
data,
|
||||||
record,
|
record,
|
||||||
resource,
|
|
||||||
permanentFilter,
|
permanentFilter,
|
||||||
...rest
|
...rest
|
||||||
}) => {
|
}) => {
|
||||||
@@ -68,8 +67,8 @@ const AlbumActions = ({
|
|||||||
}, [dispatch, ids])
|
}, [dispatch, ids])
|
||||||
|
|
||||||
const handleShare = React.useCallback(() => {
|
const handleShare = React.useCallback(() => {
|
||||||
dispatch(openShareMenu([record.id], resource, record.name))
|
dispatch(openShareMenu([record.id], 'album', record.name))
|
||||||
}, [dispatch, record, resource])
|
}, [dispatch, record])
|
||||||
|
|
||||||
const handleDownload = React.useCallback(() => {
|
const handleDownload = React.useCallback(() => {
|
||||||
dispatch(openDownloadMenu(record, DOWNLOAD_MENU_ALBUM))
|
dispatch(openDownloadMenu(record, DOWNLOAD_MENU_ALBUM))
|
||||||
|
|||||||
@@ -35,14 +35,7 @@ const useStyles = makeStyles({
|
|||||||
toolbar: { display: 'flex', justifyContent: 'space-between', width: '100%' },
|
toolbar: { display: 'flex', justifyContent: 'space-between', width: '100%' },
|
||||||
})
|
})
|
||||||
|
|
||||||
const PlaylistActions = ({
|
const PlaylistActions = ({ className, ids, data, record, ...rest }) => {
|
||||||
className,
|
|
||||||
ids,
|
|
||||||
data,
|
|
||||||
record,
|
|
||||||
resource,
|
|
||||||
...rest
|
|
||||||
}) => {
|
|
||||||
const dispatch = useDispatch()
|
const dispatch = useDispatch()
|
||||||
const translate = useTranslate()
|
const translate = useTranslate()
|
||||||
const classes = useStyles()
|
const classes = useStyles()
|
||||||
@@ -94,8 +87,8 @@ const PlaylistActions = ({
|
|||||||
}, [getAllSongsAndDispatch])
|
}, [getAllSongsAndDispatch])
|
||||||
|
|
||||||
const handleShare = React.useCallback(() => {
|
const handleShare = React.useCallback(() => {
|
||||||
dispatch(openShareMenu([record.id], resource, record.name))
|
dispatch(openShareMenu([record.id], 'playlist', record.name))
|
||||||
}, [dispatch, record, resource])
|
}, [dispatch, record])
|
||||||
|
|
||||||
const handleDownload = React.useCallback(() => {
|
const handleDownload = React.useCallback(() => {
|
||||||
dispatch(openDownloadMenu(record, DOWNLOAD_MENU_PLAY))
|
dispatch(openDownloadMenu(record, DOWNLOAD_MENU_PLAY))
|
||||||
|
|||||||
Reference in New Issue
Block a user