Fix Share dialog titles for Album and Playlist

This commit is contained in:
Deluan 2023-01-25 10:20:28 -05:00
parent 5eefb265e5
commit e0fc997adb
2 changed files with 5 additions and 13 deletions

View file

@ -37,7 +37,6 @@ const AlbumActions = ({
ids,
data,
record,
resource,
permanentFilter,
...rest
}) => {
@ -68,8 +67,8 @@ const AlbumActions = ({
}, [dispatch, ids])
const handleShare = React.useCallback(() => {
dispatch(openShareMenu([record.id], resource, record.name))
}, [dispatch, record, resource])
dispatch(openShareMenu([record.id], 'album', record.name))
}, [dispatch, record])
const handleDownload = React.useCallback(() => {
dispatch(openDownloadMenu(record, DOWNLOAD_MENU_ALBUM))

View file

@ -35,14 +35,7 @@ const useStyles = makeStyles({
toolbar: { display: 'flex', justifyContent: 'space-between', width: '100%' },
})
const PlaylistActions = ({
className,
ids,
data,
record,
resource,
...rest
}) => {
const PlaylistActions = ({ className, ids, data, record, ...rest }) => {
const dispatch = useDispatch()
const translate = useTranslate()
const classes = useStyles()
@ -94,8 +87,8 @@ const PlaylistActions = ({
}, [getAllSongsAndDispatch])
const handleShare = React.useCallback(() => {
dispatch(openShareMenu([record.id], resource, record.name))
}, [dispatch, record, resource])
dispatch(openShareMenu([record.id], 'playlist', record.name))
}, [dispatch, record])
const handleDownload = React.useCallback(() => {
dispatch(openDownloadMenu(record, DOWNLOAD_MENU_PLAY))