diff --git a/src/web/README.md b/src/web/README.md index 5a22787..fe6ce5e 100644 --- a/src/web/README.md +++ b/src/web/README.md @@ -1,4 +1,4 @@ -# bun-react-tailwind-shadcn-template +# Aurora Web To install dependencies: diff --git a/src/web/src/APITester.tsx b/src/web/src/APITester.tsx deleted file mode 100644 index a1f8fff..0000000 --- a/src/web/src/APITester.tsx +++ /dev/null @@ -1,64 +0,0 @@ -import { Button } from "@/components/ui/button"; -import { Input } from "@/components/ui/input"; -import { Label } from "@/components/ui/label"; -import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; -import { Textarea } from "@/components/ui/textarea"; -import { useRef, type FormEvent } from "react"; - -export function APITester() { - const responseInputRef = useRef(null); - - const testEndpoint = async (e: FormEvent) => { - e.preventDefault(); - - try { - const form = e.currentTarget; - const formData = new FormData(form); - const endpoint = formData.get("endpoint") as string; - const url = new URL(endpoint, location.href); - const method = formData.get("method") as string; - const res = await fetch(url, { method }); - - const data = await res.json(); - responseInputRef.current!.value = JSON.stringify(data, null, 2); - } catch (error) { - responseInputRef.current!.value = String(error); - } - }; - - return ( -
-
- - - - - -
- -