From f37b68015a14969937a4386e2ba24ccae4a7152a Mon Sep 17 00:00:00 2001 From: regalijan Date: Thu, 19 Oct 2023 16:49:14 -0400 Subject: [PATCH] Create new "admin application" --- app/routes/admin-application.tsx | 87 ++++++++++++++++++++++++++++++ functions/api/admin-apps/submit.ts | 34 ++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 app/routes/admin-application.tsx create mode 100644 functions/api/admin-apps/submit.ts diff --git a/app/routes/admin-application.tsx b/app/routes/admin-application.tsx new file mode 100644 index 0000000..852522a --- /dev/null +++ b/app/routes/admin-application.tsx @@ -0,0 +1,87 @@ +import { + Button, + Container, + Heading, + Input, + Text, + Textarea, + useToast, +} from "@chakra-ui/react"; + +export default function () { + async function submit() { + const submitReq = await fetch("/api/admin-apps/submit"); + + useToast()({ + description: submitReq.ok + ? "Your application was submitted" + : "Try again later", + duration: 10000, + isClosable: true, + status: submitReq.ok ? "success" : "error", + title: submitReq.ok ? "Success" : "Unknown Error", + }); + } + + return ( + + Admin Application +
+
+ Why do you want to be an admin? +
+