0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-30 20:33:54 -05:00

fix(console): manually trigger usage api updates on org member deletion (#6475)

This commit is contained in:
Darcy Ye 2024-08-21 11:27:31 +08:00 committed by GitHub
parent 9279d4cacd
commit 332131a0f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,6 +10,7 @@ import ActionsButton from '@/components/ActionsButton';
import EmptyDataPlaceholder from '@/components/EmptyDataPlaceholder';
import UserPreview from '@/components/ItemPreview/UserPreview';
import { RoleOption } from '@/components/OrganizationRolesSelect';
import { SubscriptionDataContext } from '@/contexts/SubscriptionDataProvider';
import { TenantsContext } from '@/contexts/TenantsProvider';
import Table from '@/ds-components/Table';
import Tag from '@/ds-components/Tag';
@ -27,6 +28,7 @@ function Members() {
const {
access: { canRemoveMember, canUpdateMemberRole },
} = useCurrentTenantScopes();
const { mutateSubscriptionQuotaAndUsages } = useContext(SubscriptionDataContext);
const { data, error, isLoading, mutate } = useSWR<TenantMemberResponse[], RequestError>(
`api/tenants/${currentTenantId}/members`,
@ -100,6 +102,7 @@ function Members() {
params: { tenantId: currentTenantId, userId: user.id },
});
void mutate();
mutateSubscriptionQuotaAndUsages();
})
)}
/>