From 006ee6903975a8b9b5434573ee2a5baf95536f22 Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 15 Nov 2022 03:33:33 +0000 Subject: [PATCH] Update file ui --- src/pages/files/[fileId].js | 42 +++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/src/pages/files/[fileId].js b/src/pages/files/[fileId].js index 862ea60..a9af38f 100644 --- a/src/pages/files/[fileId].js +++ b/src/pages/files/[fileId].js @@ -10,6 +10,7 @@ export default function File(props) { const { isValidFile, fileData } = props; const file = JSON.parse(fileData); let { + uploader, fileId, originalFileName, uploadDate, @@ -23,15 +24,17 @@ export default function File(props) { let toShow; if (!isValidFile) { - toShow = ( - <> -

Invalid File

- - - - + return ( +
+
+

Invalid File

+ + + +
+
); } if (isValidFile) { @@ -54,17 +57,16 @@ export default function File(props) { return (
-
- {isValidFile ? ( -
-

- {originalFileName} ({fileId}.{ext}) -

-

{moment(uploadDate).format("MMMM Do YYYY, h:mm:ss a")}

-

{formatBytes(size)}

-
- ) : null} -
{toShow}
+
+

+ {originalFileName} ({fileId}.{ext}) +

+

{moment(uploadDate).format("MMMM Do YYYY, h:mm:ss a")}

+

+ Uploader: {uploader.username} -{" "} + {formatBytes(size)} +

+
{toShow}