refactor: split modules and harden scraping workflows

This commit is contained in:
ShukeBta
2026-06-24 11:59:18 +08:00
parent efca3cbe69
commit 192f35d9fa
470 changed files with 47957 additions and 33839 deletions
+5 -4
View File
@@ -1,4 +1,4 @@
import { useEffect, useState } from 'react'
import { useCallback, useEffect, useState } from 'react'
import { useParams } from 'react-router-dom'
import { X } from 'lucide-react'
import toast from 'react-hot-toast'
@@ -10,12 +10,13 @@ export function PlaylistDetailPage() {
const { id = '' } = useParams()
const [detail, setDetail] = useState<PlaylistDetail | null>(null)
const refresh = () =>
playbackAPI.getPlaylist(id).then(setDetail).catch(() => setDetail(null))
const refresh = useCallback(() => {
return playbackAPI.getPlaylist(id).then(setDetail).catch(() => setDetail(null))
}, [id])
useEffect(() => {
refresh()
}, [id])
}, [refresh])
if (!detail) {
return <p className="text-sand-500">加载中…</p>