fix(core): revalidate subscription info when open ai usage panel (#6591)

This commit is contained in:
EYHN 2024-04-17 16:36:12 +08:00 committed by GitHub
commit c83d090282
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,6 +24,10 @@ export const AIUsagePanel = () => {
);
const subscriptionService = useService(SubscriptionService);
const aiSubscription = useLiveData(subscriptionService.subscription.ai$);
useEffect(() => {
// revalidate latest subscription status
subscriptionService.subscription.revalidate();
}, [subscriptionService]);
const quotaService = useService(UserQuotaService);
useEffect(() => {
quotaService.quota.revalidate();