feat: updates

This commit is contained in:
qier222 2022-04-02 16:54:37 +08:00
parent 86f088e5c9
commit 3ef7675696
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
12 changed files with 158 additions and 146 deletions

View file

@ -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,