Use redux for ShareDialog

This commit is contained in:
Deluan
2023-01-24 13:04:00 -05:00
parent 17d9573f4d
commit 051e9c556d
9 changed files with 113 additions and 56 deletions
+13
View File
@@ -12,6 +12,19 @@ export const DOWNLOAD_MENU_ALBUM = 'album'
export const DOWNLOAD_MENU_ARTIST = 'artist'
export const DOWNLOAD_MENU_PLAY = 'playlist'
export const DOWNLOAD_MENU_SONG = 'song'
export const SHARE_MENU_OPEN = 'SHARE_MENU_OPEN'
export const SHARE_MENU_CLOSE = 'SHARE_MENU_CLOSE'
export const openShareMenu = (ids, resource, name) => ({
type: SHARE_MENU_OPEN,
ids,
resource,
name,
})
export const closeShareMenu = () => ({
type: SHARE_MENU_CLOSE,
})
export const openAddToPlaylist = ({ selectedIds, onSuccess }) => ({
type: ADD_TO_PLAYLIST_OPEN,