From 899f94d4d23d7dc8b76007acb03cf4575a7070a1 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Mon, 2 Dec 2024 23:34:55 -0500 Subject: [PATCH] fixed contact page --- frontend/routes/contact/index.tsx | 221 +++++++++++++++--------------- 1 file changed, 114 insertions(+), 107 deletions(-) diff --git a/frontend/routes/contact/index.tsx b/frontend/routes/contact/index.tsx index 970fab7..0d65c78 100644 --- a/frontend/routes/contact/index.tsx +++ b/frontend/routes/contact/index.tsx @@ -13,113 +13,6 @@ interface FormState { submitted?: boolean; } -export default function Contact({ data }: PageProps) { - return ( -
- - Contact Us - - -

Contact Form

- - {/* Check if form was successfully submitted */} - {data?.submitted && ( - - )} - -
- {/* Name Input */} -
- - - {data?.errors?.name && ( -

{data.errors.name}

- )} -
- - {/* Email Input */} -
- - - {data?.errors?.email && ( -

{data.errors.email}

- )} -
- - {/* Message Textarea */} -
- - - {data?.errors?.message && ( -

- {data.errors.message} -

- )} -
- - {/* Submit Button */} -
- -
-
-
- ); -} - -// Server-side form handling export const handler: Handlers = { GET(_, ctx) { return ctx.render({}); @@ -169,3 +62,117 @@ export const handler: Handlers = { }); }, }; + +export default function Contact({ data }: PageProps) { + return ( +
+
+ + Contact + + +

+ Contact +

+ + {/* Check if form was successfully submitted */} + {data?.submitted && ( + + )} + +
+ {/* Name Input */} +
+ + + {data?.errors?.name && ( +

+ {data.errors.name} +

+ )} +
+ + {/* Email Input */} +
+ + + {data?.errors?.email && ( +

+ {data.errors.email} +

+ )} +
+ + {/* Message Textarea */} +
+ + + {data?.errors?.message && ( +

+ {data.errors.message} +

+ )} +
+ + {/* Submit Button */} +
+ +
+
+
+
+ ); +}