Add button to share selected songs

This commit is contained in:
Deluan
2023-01-24 16:31:58 -05:00
parent 69b36c75a5
commit 85084cda57
6 changed files with 56 additions and 6 deletions
+9 -4
View File
@@ -19,9 +19,13 @@ import { useDispatch, useSelector } from 'react-redux'
import { closeShareMenu } from '../actions'
export const ShareDialog = () => {
const { open, ids, resource, name } = useSelector(
(state) => state.shareDialog
)
const {
open,
ids,
resource,
name,
label = 'message.shareDialogTitle',
} = useSelector((state) => state.shareDialog)
const dispatch = useDispatch()
const notify = useNotify()
const translate = useTranslate()
@@ -88,11 +92,12 @@ export const ShareDialog = () => {
>
<DialogTitle id="share-dialog">
{resource &&
translate('message.shareDialogTitle', {
translate(label, {
resource: translate(`resources.${resource}.name`, {
smart_count: ids?.length,
}).toLocaleLowerCase(),
name,
smart_count: ids?.length,
})}
</DialogTitle>
<DialogContent>