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,10 +1,11 @@
import { fetchArtist } from '@/renderer/api/artist'
import { ArtistApiNames } from '@/renderer/api/artist'
import type {
import { IpcChannels } from '@/shared/IpcChannels'
import { APIs } from '@/shared/CacheAPIs'
import {
FetchArtistParams,
ArtistApiNames,
FetchArtistResponse,
} from '@/renderer/api/artist'
import { IpcChannels } from '@/main/IpcChannelsName'
} from '@/shared/api/Artist'
export default function useArtist(
params: FetchArtistParams,
@ -18,7 +19,7 @@ export default function useArtist(
staleTime: 5 * 60 * 1000, // 5 mins
placeholderData: (): FetchArtistResponse =>
window.ipcRenderer?.sendSync(IpcChannels.GetApiCacheSync, {
api: 'artists',
api: APIs.Artist,
query: {
id: params.id,
},