diff --git a/src/app/(pages)/[id]/page.tsx b/src/app/(pages)/[id]/page.tsx index 1cb9d2c..187c906 100644 --- a/src/app/(pages)/[id]/page.tsx +++ b/src/app/(pages)/[id]/page.tsx @@ -21,7 +21,7 @@ type Paste = { /** * The date the paste was created. */ - created: number; + created: string; /** * The detected language of the paste. @@ -59,10 +59,13 @@ export async function generateMetadata({ description: "Not found", }; } + const created = moment(data.created) + .format("MMMM Do YYYY, h:mm:ss a") + .toString(); return { title: `Paste - ${id}.${data.language}`, - description: `Created: ${moment(data.created)}\n\nClick to view the paste.`, + description: `Created: ${created}\n\nClick to view the paste.`, }; } @@ -75,11 +78,19 @@ export default async function Paste({ return notFound(); } + const created = moment(data.created) + .format("MMMM Do YYYY, h:mm:ss a") + .toString(); + return ( -
+
+
+ +

{data.language}

+

{created}

diff --git a/src/app/(pages)/page.tsx b/src/app/(pages)/page.tsx index 688d3f6..4e1dc45 100644 --- a/src/app/(pages)/page.tsx +++ b/src/app/(pages)/page.tsx @@ -60,7 +60,7 @@ export default function Home(): ReactElement { />
-
+