mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 21:58:03 +00:00
feat: updates
This commit is contained in:
parent
0b4baa3eff
commit
222fb02355
77 changed files with 654 additions and 551 deletions
|
|
@ -1,8 +1,5 @@
|
|||
import {
|
||||
fetchListenedRecords,
|
||||
FetchListenedRecordsParams,
|
||||
} from '@/web/api/user'
|
||||
import { UserApiNames } from '@/shared/api/User'
|
||||
import { fetchListenedRecords } from '@/web/api/user'
|
||||
import { UserApiNames, FetchListenedRecordsResponse } from '@/shared/api/User'
|
||||
import { APIs } from '@/shared/CacheAPIs'
|
||||
import { IpcChannels } from '@/shared/IpcChannels'
|
||||
import { useQuery } from 'react-query'
|
||||
|
|
@ -24,10 +21,10 @@ export default function useUserListenedRecords(params: {
|
|||
{
|
||||
refetchOnWindowFocus: false,
|
||||
enabled: !!uid,
|
||||
// placeholderData: (): FetchUserArtistsResponse =>
|
||||
// window.ipcRenderer?.sendSync(IpcChannels.GetApiCacheSync, {
|
||||
// api: APIs.UserArtists,
|
||||
// }),
|
||||
placeholderData: (): FetchListenedRecordsResponse =>
|
||||
window.ipcRenderer?.sendSync(IpcChannels.GetApiCacheSync, {
|
||||
api: APIs.UserArtists,
|
||||
}),
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import { IpcChannels } from '@/shared/IpcChannels'
|
|||
import { APIs } from '@/shared/CacheAPIs'
|
||||
import { fetchUserPlaylists } from '@/web/api/user'
|
||||
import { FetchUserPlaylistsResponse, UserApiNames } from '@/shared/api/User'
|
||||
import toast from 'react-hot-toast'
|
||||
|
||||
export default function useUserPlaylists() {
|
||||
const { data: user } = useUser()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue