mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 13:48:02 +00:00
feat: 音乐库增加查看收藏的专辑/歌单/歌手功能
This commit is contained in:
parent
bbd5299341
commit
2e41001d02
6 changed files with 203 additions and 44 deletions
11
src/renderer/hooks/useUserArtists.ts
Normal file
11
src/renderer/hooks/useUserArtists.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import type { FetchUserArtistsResponse } from '@/api/user'
|
||||
import { UserApiNames, fetchUserArtists } from '@/api/user'
|
||||
|
||||
export default function useUserArtists() {
|
||||
return useQuery([UserApiNames.FETCH_USER_ARTIST], fetchUserArtists, {
|
||||
placeholderData: (): FetchUserArtistsResponse =>
|
||||
window.ipcRenderer?.sendSync('getApiCacheSync', {
|
||||
api: 'album/sublist',
|
||||
}),
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue