From 50881fc9430ea7697243849664bb27c07de498d0 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 17 Nov 2022 05:59:53 +0000 Subject: [PATCH] Start work on adding meta data to images --- src/pages/files/[fileId].js | 73 ++++++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 30 deletions(-) diff --git a/src/pages/files/[fileId].js b/src/pages/files/[fileId].js index a9af38f..9c98147 100644 --- a/src/pages/files/[fileId].js +++ b/src/pages/files/[fileId].js @@ -1,5 +1,6 @@ import { Button } from "@nextui-org/react"; import moment from "moment/moment"; +import { NextSeo } from "next-seo"; import Image from "next/image"; import Link from "next/link"; import { getFileInfo } from "src/utils/helpers/fileHelpers"; @@ -22,19 +23,24 @@ export default function File(props) { size, } = file; + const metaData = ; + let toShow; if (!isValidFile) { return ( -
-
-

Invalid File

- - - + <> + {metaData} +
+
+

Invalid File

+ + + +
-
+ ); } if (isValidFile) { @@ -56,28 +62,35 @@ export default function File(props) { } return ( -
-
-

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

-

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

-

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

-
{toShow}
- + <> + {metaData} +
+
+

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

+

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

+

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

+
+ {toShow} +
+ {!toShow ? ( + + ) : null} +
-
+ ); }