From e877cd22585115aef96176509dd2309f73856760 Mon Sep 17 00:00:00 2001 From: Nathan Totten Date: Fri, 7 Feb 2025 07:08:43 -0500 Subject: [PATCH] remove command --- middleware.ts | 11 ----------- src/App.tsx | 35 ++--------------------------------- 2 files changed, 2 insertions(+), 44 deletions(-) delete mode 100644 middleware.ts diff --git a/middleware.ts b/middleware.ts deleted file mode 100644 index 8f005e7..0000000 --- a/middleware.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default function middleware(request: Request) { - const url = new URL(request.url); - if (request.method === "GET" && url.pathname === "/") { - const accept = request.headers.get("accept"); - if (!accept?.includes("text/html")) { - return new Response(crypto.randomUUID(), { - headers: { "content-type": "text/plain" }, - }); - } - } -} diff --git a/src/App.tsx b/src/App.tsx index f029428..a46566f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,5 +1,5 @@ import { Button } from "@/components/ui/button"; -import { Braces, Check, Copy, Terminal } from "lucide-react"; +import { Braces, Check, Copy } from "lucide-react"; import { useCallback, useState } from "react"; import "./App.css"; @@ -7,7 +7,6 @@ import "./App.css"; export default function UUIDGenerator() { const [uuid, setUuid] = useState(crypto.randomUUID()); const [copied, setCopied] = useState(false); - const [shellCopied, setShellCopied] = useState(false); const generateNewUuid = useCallback(() => { setUuid(crypto.randomUUID()); @@ -21,14 +20,6 @@ export default function UUIDGenerator() { }); }, [uuid]); - const cmd = 'curl -s -w "\\n" https://uuid.new'; - const copyShellCommand = useCallback(() => { - navigator.clipboard.writeText(cmd).then(() => { - setShellCopied(true); - setTimeout(() => setShellCopied(false), 2000); - }); - }, []); - return (
@@ -60,33 +51,11 @@ export default function UUIDGenerator() {
-
-
-
- - Curl Command -
- -
- {cmd} -
);