fix: remove flow call quota API in useUserQuota hook

This commit is contained in:
lethemanh
2024-12-03 14:10:41 +07:00
parent f4ed433e6a
commit 4c05cf9dee
2 changed files with 6 additions and 6 deletions
@@ -16,7 +16,12 @@ const DiskUsage = () => {
const [usedBytes, setUsedBytes] = useState(0);
const [totalBytes, setTotalBytes] = useState(0);
const { quota } = useUserQuota()
const { quota, getQuota } = useUserQuota();
useEffect(() => {
getQuota();
}, [])
useEffect(() => {
if (FeatureTogglesService.isActiveFeatureName(FeatureNames.COMPANY_USER_QUOTA)) {
setUsed(Math.round(quota.used / quota.total * 100))