don't allow more than 100% usage
This commit is contained in:
parent
4a53834062
commit
bc513978b7
|
@ -16,7 +16,7 @@ export function FamilyUsageProgressBar({
|
|||
<Box position={'relative'} width="100%">
|
||||
<Progressbar
|
||||
sx={{ backgroundColor: 'transparent' }}
|
||||
value={(userUsage * 100) / totalStorage}
|
||||
value={Math.min((userUsage * 100) / totalStorage, 100)}
|
||||
/>
|
||||
<Progressbar
|
||||
sx={{
|
||||
|
@ -28,7 +28,7 @@ export function FamilyUsageProgressBar({
|
|||
},
|
||||
width: '100%',
|
||||
}}
|
||||
value={(totalUsage * 100) / totalStorage}
|
||||
value={Math.min((totalUsage * 100) / totalStorage, 100)}
|
||||
/>
|
||||
</Box>
|
||||
);
|
||||
|
|
|
@ -13,7 +13,7 @@ interface Iprops {
|
|||
export function IndividualUsageSection({ usage, storage, fileCount }: Iprops) {
|
||||
return (
|
||||
<Box width="100%">
|
||||
<Progressbar value={(usage * 100) / storage} />
|
||||
<Progressbar value={Math.min((usage * 100) / storage, 100)} />
|
||||
<SpaceBetweenFlex
|
||||
sx={{
|
||||
marginTop: 1.5,
|
||||
|
|
Loading…
Reference in a new issue