feat: updates

This commit is contained in:
qier222 2022-04-16 21:14:03 +08:00
parent fc1c25f404
commit 7b6579e068
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
48 changed files with 1155 additions and 777 deletions

View file

@ -1,9 +1,10 @@
import { likeAPlaylist } from '@/renderer/api/playlist'
import type { FetchUserPlaylistsResponse } from '@/renderer/api/user'
import { UserApiNames, fetchUserPlaylists } from '@/renderer/api/user'
import { useQueryClient } from 'react-query'
import useUser from './useUser'
import { IpcChannels } from '@/main/IpcChannelsName'
import { IpcChannels } from '@/shared/IpcChannels'
import { APIs } from '@/shared/CacheAPIs'
import { fetchUserPlaylists } from 'api/user'
import { FetchUserPlaylistsResponse, UserApiNames } from '@/shared/api/User'
export default function useUserPlaylists() {
const { data: user } = useUser()
@ -33,7 +34,7 @@ export default function useUserPlaylists() {
refetchOnWindowFocus: true,
placeholderData: (): FetchUserPlaylistsResponse =>
window.ipcRenderer?.sendSync(IpcChannels.GetApiCacheSync, {
api: 'user/playlist',
api: APIs.UserPlaylist,
query: {
uid: params.uid,
},