feat: notice of the expire of education verify (#24210)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Joel 2025-08-20 15:37:46 +08:00 committed by GitHub
commit ddf05ca059
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 400 additions and 11 deletions

View file

@ -56,9 +56,10 @@ export const useEducationStatus = (disable?: boolean) => {
enabled: !disable,
queryKey: [NAME_SPACE, 'education-status'],
queryFn: () => {
return get<{ result: boolean }>('/account/education')
return get<{ is_student: boolean, allow_refresh: boolean, expire_at: number | null }>('/account/education')
},
retry: false,
gcTime: 0, // No cache. Prevent switch account caused stale data
})
}