fix: bugs

fix: bugs
This commit is contained in:
qier222 2022-04-09 00:28:37 +08:00
parent 1444bbefa2
commit 70d1de0e0f
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
62 changed files with 368 additions and 284 deletions

View file

@ -1,6 +1,7 @@
import { TrackApiNames, fetchLyric } from '@/api/track'
import type { FetchLyricParams, FetchLyricResponse } from '@/api/track'
import reactQueryClient from '@/utils/reactQueryClient'
import { TrackApiNames, fetchLyric } from '@/renderer/api/track'
import type { FetchLyricParams, FetchLyricResponse } from '@/renderer/api/track'
import reactQueryClient from '@/renderer/utils/reactQueryClient'
import { IpcChannels } from '@/main/IpcChannelsName'
export default function useLyric(params: FetchLyricParams) {
return useQuery(
@ -13,7 +14,7 @@ export default function useLyric(params: FetchLyricParams) {
refetchInterval: false,
staleTime: Infinity,
initialData: (): FetchLyricResponse | undefined =>
window.ipcRenderer?.sendSync('getApiCacheSync', {
window.ipcRenderer?.sendSync(IpcChannels.GetApiCacheSync, {
api: 'lyric',
query: {
id: params.id,