mirror of
https://github.com/wahyd4/you-music.git
synced 2026-08-09 05:06:44 +10:00
Update download logic
This commit is contained in:
@@ -37,8 +37,8 @@ export default function SearchPage({ onPlayMusic }: SearchPageProps) {
|
||||
})
|
||||
|
||||
const downloadMutation = useMutation({
|
||||
mutationFn: ({ url, title }: { url: string; title: string; thumbnail?: string; artist?: string }) =>
|
||||
downloadApi.downloadMusic({ url, title }),
|
||||
mutationFn: ({ url, title, thumbnail, artist }: { url: string; title: string; thumbnail?: string; artist?: string }) =>
|
||||
downloadApi.downloadMusic({ url, title, thumbnail, artist }),
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['download-status'] })
|
||||
toast.success('Download started! Check Download Center for progress.')
|
||||
|
||||
Reference in New Issue
Block a user