diff --git a/src/app/(pages)/[id]/page.tsx b/src/app/(pages)/[id]/page.tsx index 187c906..9315082 100644 --- a/src/app/(pages)/[id]/page.tsx +++ b/src/app/(pages)/[id]/page.tsx @@ -1,10 +1,12 @@ -import { cache, ReactElement } from "react"; +import React, { cache, ReactElement } from "react"; import { ActionMenu } from "@/app/components/action-menu"; import { Metadata } from "next"; import moment from "moment"; import { notFound } from "next/navigation"; import { CodeBlock } from "@/app/components/code-block"; import { detectLanguage } from "@/app/common/lang-detection/detection"; +import { Button } from "@/app/components/ui/button"; +import Link from "next/link"; type PasteProps = { params: { @@ -59,13 +61,10 @@ 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: ${created}\n\nClick to view the paste.`, + description: `Click to view the paste.`, }; } @@ -84,9 +83,11 @@ export default async function Paste({ return (
-
- -
+ + + + +

{data.language}

diff --git a/src/app/(pages)/page.tsx b/src/app/(pages)/page.tsx index 4e1dc45..0b1673c 100644 --- a/src/app/(pages)/page.tsx +++ b/src/app/(pages)/page.tsx @@ -60,18 +60,16 @@ export default function Home(): ReactElement { />
-
- - - -
+ + +
); } diff --git a/src/app/components/action-menu.tsx b/src/app/components/action-menu.tsx index 318cad7..0779040 100644 --- a/src/app/components/action-menu.tsx +++ b/src/app/components/action-menu.tsx @@ -1,6 +1,4 @@ import React from "react"; -import { Button } from "@/app/components/ui/button"; -import Link from "next/link"; type ActionMenuProps = { children?: React.ReactNode; @@ -8,11 +6,10 @@ type ActionMenuProps = { export function ActionMenu({ children }: ActionMenuProps) { return ( -
- {children} - - - +
+
+ {children} +
); } diff --git a/src/app/components/code-block.tsx b/src/app/components/code-block.tsx index 931a689..d0fe041 100644 --- a/src/app/components/code-block.tsx +++ b/src/app/components/code-block.tsx @@ -20,7 +20,7 @@ export function CodeBlock({ code, language }: CodeBlockProps): ReactElement {