feat: updates

This commit is contained in:
qier222 2023-01-07 14:39:03 +08:00
parent 884f3df41a
commit c6c59b2cd9
No known key found for this signature in database
84 changed files with 3531 additions and 2616 deletions

View file

@ -15,6 +15,8 @@ import { AnimatePresence, motion } from 'framer-motion'
import { scrollToBottom } from '@/web/utils/common'
import { throttle } from 'lodash-es'
import { useTranslation } from 'react-i18next'
import VideoRow from '@/web/components/VideoRow'
import useUserVideos from '@/web/api/hooks/useUserVideos'
const Albums = () => {
const { data: albums } = useUserAlbums()
@ -35,6 +37,11 @@ const Artists = () => {
return <ArtistRow artists={artists?.data || []} />
}
const Videos = () => {
const { data: videos } = useUserVideos()
return <VideoRow videos={videos?.data || []} />
}
const CollectionTabs = ({ showBg }: { showBg: boolean }) => {
const { t } = useTranslation()
@ -130,6 +137,7 @@ const Collections = () => {
{selectedTab === 'albums' && <Albums />}
{selectedTab === 'playlists' && <Playlists />}
{selectedTab === 'artists' && <Artists />}
{selectedTab === 'videos' && <Videos />}
</div>
<div ref={observePoint}></div>
</div>