Skip to content

Commit c4db83f

Browse files
committed
Show the limit for the file uploading
1 parent ce1b7a7 commit c4db83f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/components/upload/FileCard.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import CancelFile from "../vectors/CancelFile";
44
import MoveFirstIcon from "../vectors/MoveFirstIcon";
55

66
import { round } from "../../utils/mathUtils";
7+
import { MAX_SIZE } from "../../utils/computeQuantities";
78

89
import "./FileCard.css";
910

@@ -70,7 +71,8 @@ const FileCard: FC<Props> = ({
7071
size: {numberFormat.format(round(size, 1))}MB
7172
</small>
7273
<small className="fileCard__stats__unit">
73-
cum. size: {numberFormat.format(round(cumSize, 1))}MB
74+
cum. size: {numberFormat.format(round(cumSize, 1))}MB/
75+
{numberFormat.format(round(MAX_SIZE, 1))}MB
7476
</small>
7577
</span>
7678
</div>

src/components/upload/Home.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import FileErrors from "./FileErrors";
1010
import useFiles from "../../hooks/useFiles";
1111
import FirebaseContext from "../../context/FirebaseContext";
1212

13-
import computeQuantities from "../../utils/computeQuantities";
13+
import computeQuantities, { MAX_SIZE } from "../../utils/computeQuantities";
1414
import { round } from "../../utils/mathUtils";
1515

1616
import "./Home.css";
@@ -59,7 +59,6 @@ const Home: FC<{}> = () => {
5959
const {
6060
totalArticles,
6161
totalCitations,
62-
totalSize,
6362
articleCap,
6463
citationCap,
6564
sizeCap,
@@ -97,7 +96,7 @@ const Home: FC<{}> = () => {
9796
<div className="frame-article">
9897
<span className="total-articles">
9998
{numberFormat.format(round(sizeCap, 1))}/
100-
{numberFormat.format(round(totalSize, 1))}
99+
{numberFormat.format(round(MAX_SIZE, 1))}
101100
</span>
102101
<span className="articles">size [MB]</span>
103102
</div>

0 commit comments

Comments
 (0)