-
Sign in
-
);
}
diff --git a/app/auth/sign-up/page.tsx b/app/auth/sign-up/page.tsx
index d6ebab34..da6b8a5a 100644
--- a/app/auth/sign-up/page.tsx
+++ b/app/auth/sign-up/page.tsx
@@ -1,91 +1,134 @@
-// app/app/auth/sign-up/page.tsx
-"use client";
+// app/auth/sign-up/page.tsx
+import { Suspense } from "react";
+import type { Metadata } from "next";
+import Link from "next/link";
-import { useState } from "react";
-import { useRouter } from "next/navigation";
+// UI (shadcn)
+import { Input } from "@/components/ui/input";
+import { Button } from "@/components/ui/button";
+
+export const metadata: Metadata = { title: "Create account" };
export default function SignUpPage() {
- const r = useRouter();
- const [form, setForm] = useState({ username: "", email: "", password: "", agree: false });
- const [busy, setBusy] = useState(false);
- const [err, setErr] = useState
(null);
- const canSubmit = form.username.length >= 3 && form.password.length >= 8 && form.agree && !busy;
+ return (
+
+
+
+
Create account
+
+ Pick a username and password. Email is optional (recommended for password reset).
+
+
- async function submit() {
- setBusy(true); setErr(null);
+
Loading…}>
+
+
+
+
+ Already have an account?{" "}
+
+ Sign in
+
+
+
+
+ );
+}
+
+"use client";
+
+import { useRouter, useSearchParams } from "next/navigation";
+import { useState } from "react";
+
+function SignUpClient() {
+ const router = useRouter();
+ const sp = useSearchParams();
+
+ const [username, setUsername] = useState("");
+ const [email, setEmail] = useState(""); // optional
+ const [password, setPassword] = useState("");
+ const [submitting, setSubmitting] = useState(false);
+ const [err, setErr] = useState