mirror of
https://github.com/logos-storage/logos-storage-marketplace-ui.git
synced 2026-02-20 13:23:11 +00:00
Display full size when the user exceeds the limit"
This commit is contained in:
parent
3605aa3d4f
commit
78c344d9db
@ -15,7 +15,10 @@ export function AvailabilitySpaceAllocation({ availability, space }: Props) {
|
||||
const size = availability.totalSize * unit;
|
||||
const isUpdating = !!availability.id;
|
||||
const allocated = isUpdating ? quotaReservedBytes - size : quotaReservedBytes;
|
||||
const remaining = quotaMaxBytes - allocated - size;
|
||||
const remaining =
|
||||
size > quotaMaxBytes - allocated
|
||||
? quotaMaxBytes - allocated
|
||||
: quotaMaxBytes - allocated - size;
|
||||
|
||||
const spaceData = [
|
||||
{
|
||||
@ -28,7 +31,7 @@ export function AvailabilitySpaceAllocation({ availability, space }: Props) {
|
||||
},
|
||||
{
|
||||
title: "Remaining space",
|
||||
size: remaining < 0 ? 0 : remaining,
|
||||
size: remaining,
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user