mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 13:48:02 +00:00
feat: updates
This commit is contained in:
parent
86f088e5c9
commit
3ef7675696
12 changed files with 158 additions and 146 deletions
|
|
@ -4,8 +4,12 @@ import reactQueryClient from '@/utils/reactQueryClient'
|
|||
export function fetchPersonalFMWithReactQuery() {
|
||||
return reactQueryClient.fetchQuery(
|
||||
PersonalFMApiNames.FETCH_PERSONAL_FM,
|
||||
() => {
|
||||
return fetchPersonalFM()
|
||||
async () => {
|
||||
const data = await fetchPersonalFM()
|
||||
if (!data.data?.length) {
|
||||
throw new Error('No data')
|
||||
}
|
||||
return data
|
||||
},
|
||||
{
|
||||
retry: 3,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue