mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 21:58:03 +00:00
feat: updates
This commit is contained in:
parent
719a3a60d4
commit
86f088e5c9
9 changed files with 87 additions and 69 deletions
|
|
@ -8,6 +8,21 @@ import DailyTracksCard from '@/components/DailyTracksCard'
|
|||
import FMCard from '@/components/FMCard'
|
||||
|
||||
export default function Home() {
|
||||
const {
|
||||
data: dailyRecommendPlaylists,
|
||||
isLoading: isLoadingDailyRecommendPlaylists,
|
||||
} = useQuery(
|
||||
PlaylistApiNames.FETCH_DAILY_RECOMMEND_PLAYLISTS,
|
||||
fetchDailyRecommendPlaylists,
|
||||
{
|
||||
retry: false,
|
||||
placeholderData: () =>
|
||||
window.ipcRenderer?.sendSync('getApiCacheSync', {
|
||||
api: 'recommend/resource',
|
||||
}),
|
||||
}
|
||||
)
|
||||
|
||||
const {
|
||||
data: recommendedPlaylists,
|
||||
isLoading: isLoadingRecommendedPlaylists,
|
||||
|
|
@ -24,20 +39,6 @@ export default function Home() {
|
|||
}
|
||||
)
|
||||
|
||||
const {
|
||||
data: dailyRecommendPlaylists,
|
||||
isLoading: isLoadingDailyRecommendPlaylists,
|
||||
} = useQuery(
|
||||
PlaylistApiNames.FETCH_DAILY_RECOMMEND_PLAYLISTS,
|
||||
fetchDailyRecommendPlaylists,
|
||||
{
|
||||
placeholderData: () =>
|
||||
window.ipcRenderer?.sendSync('getApiCacheSync', {
|
||||
api: 'recommend/resource',
|
||||
}),
|
||||
}
|
||||
)
|
||||
|
||||
const playlists = [
|
||||
...(dailyRecommendPlaylists?.recommend ?? []),
|
||||
...(recommendedPlaylists?.result ?? []),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue