feat: updates

This commit is contained in:
qier222 2022-03-19 17:03:29 +08:00
parent 08abf8229f
commit fb21405bf9
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
33 changed files with 699 additions and 361 deletions

View file

@ -1,4 +1,7 @@
import type { FetchUserPlaylistsParams } from '@/api/user'
import type {
FetchUserPlaylistsParams,
FetchUserPlaylistsResponse,
} from '@/api/user'
import { UserApiNames, fetchUserPlaylists } from '@/api/user'
export default function useUserPlaylists(params: FetchUserPlaylistsParams) {
@ -14,6 +17,13 @@ export default function useUserPlaylists(params: FetchUserPlaylistsParams) {
params.uid !== 0 &&
params.offset !== undefined
),
placeholderData: (): FetchUserPlaylistsResponse =>
window.ipcRenderer.sendSync('getApiCacheSync', {
api: 'user/playlist',
query: {
uid: params.uid,
},
}),
}
)
}