quintodrome/ui/src/album/AlbumSongBulkActions.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
690 B
JavaScript
Raw Normal View History

import React, { Fragment, useEffect } from 'react'
import { useUnselectAll } from 'react-admin'
2020-09-21 16:10:52 -08:00
import { playNext } from '../audioplayer'
import AddToQueueButton from '../song/AddToQueueButton'
2020-05-17 16:57:38 -08:00
import AddToPlaylistButton from '../song/AddToPlaylistButton'
export const AlbumSongBulkActions = (props) => {
const unselectAll = useUnselectAll()
useEffect(() => {
unselectAll('albumSong')
// eslint-disable-next-line
}, [])
return (
<Fragment>
2020-09-21 16:10:52 -08:00
<AddToQueueButton
{...props}
action={playNext}
label={'resources.song.actions.playNext'}
/>
<AddToQueueButton {...props} />
2020-05-17 16:57:38 -08:00
<AddToPlaylistButton {...props} />
</Fragment>
)
}