mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-16 05:47:09 +08:00
refactor(core): use overcapacityMemberCount for quota checking instead of calculating the difference (#12117)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved accuracy of member quota warnings by updating the logic that detects when the member limit has been exceeded. - Enhanced test reliability by adjusting member list pagination test to better handle confirmation modals. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -57,8 +57,7 @@ export const QuotaCheck = ({
|
||||
if (workspaceMeta.flavour === 'local' || !quota || isTeam) {
|
||||
return;
|
||||
}
|
||||
const memberOverflow = quota.memberCount > quota.memberLimit;
|
||||
// remember to use real percent
|
||||
const memberOverflow = quota.overcapacityMemberCount > 0;
|
||||
const storageOverflow = usedPercent && usedPercent >= 100;
|
||||
const message = getSyncPausedMessage(
|
||||
!!isOwner,
|
||||
|
||||
Reference in New Issue
Block a user