"use client"; import { FormEvent, Suspense, useEffect, useState } from "react"; import Link from "next/link"; import { useRouter, useSearchParams } from "next/navigation"; import { useAccount } from "@/contexts/AccountContext"; function SignUpContent() { const router = useRouter(); const searchParams = useSearchParams(); const { user, hydrated, signUp } = useAccount(); const [username, setUsername] = useState(""); const [displayName, setDisplayName] = useState(""); const [password, setPassword] = useState(""); const [error, setError] = useState(null); const [busy, setBusy] = useState(false); useEffect(() => { if (!hydrated || !user) return; const next = searchParams.get("next"); router.replace(next && next.startsWith("/") && !next.startsWith("//") ? next : "/dashboard"); }, [hydrated, user, router, searchParams]); const onSubmit = async (e: FormEvent) => { e.preventDefault(); setError(null); setBusy(true); const res = await signUp(username, password, displayName || undefined); setBusy(false); if (!res.ok) { setError(res.error); return; } const next = searchParams.get("next"); router.push(next && next.startsWith("/") && !next.startsWith("//") ? next : "/dashboard"); }; if (!hydrated || user) { return (
Loading…
); } return (

provision

Create account

Provisioning writes credentials only to this browser profile. Match your{" "} display name to forum signatures so reputation and escrow threads resolve cleanly.

Separate forum / exchange / wiki onions each need their own copy:{" "} Hidden services account guide .

{error ? (

{error}

) : null}
setUsername(e.target.value)} autoComplete="username" required className="glass w-full rounded-xl border border-white/10 bg-transparent px-4 py-3 font-mono text-sm" placeholder="ledger_rat" />
setDisplayName(e.target.value)} className="glass w-full rounded-xl border border-white/10 bg-transparent px-4 py-3 font-mono text-sm" placeholder="Defaults to handle if empty" />
setPassword(e.target.value)} autoComplete="new-password" required className="glass w-full rounded-xl border border-white/10 bg-transparent px-4 py-3 font-mono text-sm" />

Already have a handle?{" "} Sign in

← Hub

); } export default function SignUpPage() { return ( Loading… } > ); }