feat: updates

This commit is contained in:
qier222 2022-03-19 17:03:29 +08:00
parent 08abf8229f
commit fb21405bf9
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
33 changed files with 699 additions and 361 deletions

View file

@ -1,8 +1,12 @@
import { fetchUserAccount } from '@/api/user'
import { fetchUserAccount, fetchUserAccountResponse } from '@/api/user'
import { UserApiNames } from '@/api/user'
export default function useUser() {
return useQuery(UserApiNames.FETCH_USER_ACCOUNT, fetchUserAccount, {
refetchOnWindowFocus: true,
placeholderData: (): fetchUserAccountResponse | undefined =>
window.ipcRenderer.sendSync('getApiCacheSync', {
api: 'user/account',
}),
})
}