mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-27 06:22:46 +03:00
fix(core): revalidate subscription info when open ai usage panel
This commit is contained in:
parent
c7373d4651
commit
6ca174bb14
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user