|
|
|
@ -1,4 +1,4 @@ |
|
|
|
import { useState } from 'react' |
|
|
|
import { useEffect, useState } from 'react' |
|
|
|
import { useQuery } from 'react-query' |
|
|
|
import { useQuery } from 'react-query' |
|
|
|
|
|
|
|
|
|
|
|
import { T9n } from 'features/T9n' |
|
|
|
import { T9n } from 'features/T9n' |
|
|
|
@ -61,10 +61,7 @@ export const MatchDownloadPopup = ({ |
|
|
|
} |
|
|
|
} |
|
|
|
const { refetch } = useQuery( |
|
|
|
const { refetch } = useQuery( |
|
|
|
querieKeys.downloadPlaylist, |
|
|
|
querieKeys.downloadPlaylist, |
|
|
|
() => { |
|
|
|
() => downloadPlaylist(config), |
|
|
|
setPlaylistConfig(config) |
|
|
|
|
|
|
|
downloadPlaylist(config) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
enabled: false, // disable this query from automatically running
|
|
|
|
enabled: false, // disable this query from automatically running
|
|
|
|
refetchOnWindowFocus: false, |
|
|
|
refetchOnWindowFocus: false, |
|
|
|
@ -82,6 +79,13 @@ export const MatchDownloadPopup = ({ |
|
|
|
openDownloadNotification() |
|
|
|
openDownloadNotification() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
setPlaylistConfig(config) |
|
|
|
|
|
|
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
|
|
|
|
|
|
}, [ |
|
|
|
|
|
|
|
downloadConfig, |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
const handleChange = (id: string) => { |
|
|
|
const handleChange = (id: string) => { |
|
|
|
setDownloadConfig((prev) => Object.keys(prev) |
|
|
|
setDownloadConfig((prev) => Object.keys(prev) |
|
|
|
.reduce((result: typeof initialRadioBtns, key: keyof typeof initialRadioBtns) => ({ |
|
|
|
.reduce((result: typeof initialRadioBtns, key: keyof typeof initialRadioBtns) => ({ |
|
|
|
|