Skip to content

Commit

Permalink
fix numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
vird committed Nov 22, 2023
1 parent 89c56d5 commit 0b5ab50
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions renderer/components/DataRelated.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ export default function DataRelated() {
{calculateSize(dataPacked)}
</span>
<span className="w-full h-full flex items-center justify-center border-l border-dashed border-black text-xl">
~ 2%
{dataPacked != null && weaveSize != null
? `~ ${((dataPacked / weaveSize) * 100).toFixed(2)}%`
: "?"}
</span>
</div>

Expand All @@ -88,7 +90,9 @@ export default function DataRelated() {
{calculateSize(storageAvailable)}
</span>
<span className="w-full h-full flex items-center justify-center border-l border-dashed border-black text-xl">
~ 4%
{storageAvailable != null && weaveSize != null
? `~ ${((storageAvailable / weaveSize) * 100).toFixed(2)}%`
: "?"}
</span>
</div>

Expand All @@ -97,7 +101,7 @@ export default function DataRelated() {
{calculateSize(weaveSize)}
</span>
<span className="w-full h-full flex items-center justify-center border-l border-dashed border-black text-xl">
~ 4%
100%
</span>
</div>
</div>
Expand Down

0 comments on commit 0b5ab50

Please sign in to comment.