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

This commit is contained in:
EYHN 2024-04-17 15:54:01 +08:00
parent c7373d4651
commit 6ca174bb14
No known key found for this signature in database
GPG Key ID: 936F232D66B3E1FE

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();