From 6563f272e7f6e37a1197905e91fb56cd135ee453 Mon Sep 17 00:00:00 2001 From: THIS ONE IS A LITTLE BIT TRICKY KRUB Date: Fri, 4 Apr 2025 15:37:21 +0700 Subject: [PATCH] feat: improve code readability in SignupPage by formatting and restructuring JSX elements --- frontend/app/auth/signup/page.tsx | 129 +++++++++++++++++++++++------- 1 file changed, 98 insertions(+), 31 deletions(-) diff --git a/frontend/app/auth/signup/page.tsx b/frontend/app/auth/signup/page.tsx index ed0cb02..24b28a4 100644 --- a/frontend/app/auth/signup/page.tsx +++ b/frontend/app/auth/signup/page.tsx @@ -14,9 +14,18 @@ import type { z } from "zod"; import { useRouter } from "next/navigation"; import { registerUser } from "@/api/authentication"; import { SessionContext } from "@/context/SessionContext"; -import { Eye, EyeOff, Leaf, ArrowRight, AlertCircle, Loader2, Check } from "lucide-react"; +import { + Eye, + EyeOff, + Leaf, + ArrowRight, + AlertCircle, + Loader2, + Check, +} from "lucide-react"; import { Alert, AlertDescription } from "@/components/ui/alert"; import { Progress } from "@/components/ui/progress"; +import { GoogleSigninButton } from "../signin/google-oauth"; export default function SignupPage() { const [serverError, setServerError] = useState(null); @@ -75,7 +84,9 @@ export default function SignupPage() { const data = await registerUser(values.email, values.password); if (!data) { - setServerError("An error occurred while registering. Please try again."); + setServerError( + "An error occurred while registering. Please try again." + ); throw new Error("No data received from the server."); } @@ -120,9 +131,12 @@ export default function SignupPage() {
-

Join the farming revolution

+

+ Join the farming revolution +

- Create your account today and discover how ForFarm can help you optimize your agricultural operations. + Create your account today and discover how ForFarm can help + you optimize your agricultural operations.

{[ @@ -148,11 +162,18 @@ export default function SignupPage() {
{/* Theme Selector Placeholder */} -
Theme Selector Placeholder
+
+ Theme Selector Placeholder +
- Forfarm + Forfarm
@@ -160,7 +181,10 @@ export default function SignupPage() {

Create your account

Already have an account?{" "} - + Sign in

@@ -184,7 +208,10 @@ export default function SignupPage() {
{/* Email */}
-