chore: only show file storage used section if used more than 0

This commit is contained in:
Aman Harwara
2023-09-06 15:34:21 +05:30
parent 422506da0b
commit 59130e8d85

View File

@@ -147,9 +147,11 @@ const VaultItem = ({ vault }: Props) => {
)}
<span className="mr-auto overflow-hidden text-ellipsis text-sm">Vault ID: {vault.systemIdentifier}</span>
<span className="mr-auto overflow-hidden text-ellipsis text-sm">
File storage used: {formatSizeToReadableString(vault.sharing?.fileBytesUsed ?? 0)}
</span>
{!!vault.sharing?.fileBytesUsed && (
<span className="mr-auto overflow-hidden text-ellipsis text-sm">
File storage used: {formatSizeToReadableString(vault.sharing?.fileBytesUsed ?? 0)}
</span>
)}
<div className="mt-2 flex w-full flex-wrap gap-3">
<Button label="Edit" className="text-xs" onClick={openEditModal} />