mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 13:48:02 +00:00
refactor: version 2.0 (React)
This commit is contained in:
parent
7dad7d810a
commit
950f72d4e8
356 changed files with 7901 additions and 29547 deletions
31
packages/renderer/src/pages/Home.tsx
Normal file
31
packages/renderer/src/pages/Home.tsx
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import { PlaylistApiNames, fetchRecommendedPlaylists } from '@/api/playlist'
|
||||
import CoverRow from '@/components/CoverRow'
|
||||
import DailyTracksCard from '@/components/DailyTracksCard'
|
||||
import FMCard from '@/components/FMCard'
|
||||
|
||||
export default function Home() {
|
||||
const {
|
||||
data: recommendedPlaylists,
|
||||
isLoading: isLoadingRecommendedPlaylists,
|
||||
} = useQuery(PlaylistApiNames.FETCH_RECOMMENDED_PLAYLISTS, () => {
|
||||
return fetchRecommendedPlaylists({})
|
||||
})
|
||||
|
||||
return (
|
||||
<div>
|
||||
<CoverRow
|
||||
title="Good Morning"
|
||||
playlists={recommendedPlaylists?.result.slice(0, 10) ?? []}
|
||||
isSkeleton={isLoadingRecommendedPlaylists}
|
||||
/>
|
||||
|
||||
<div className="mt-10 mb-4 text-[28px] font-bold text-black dark:text-white">
|
||||
For You
|
||||
</div>
|
||||
<div className="grid grid-cols-2 gap-6">
|
||||
<DailyTracksCard />
|
||||
<FMCard />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue