"use client"; import Link from "next/link"; import { useActionState } from "react"; import { registerAction, type RegisterState } from "./actions"; const initialState: RegisterState = null; export default function RegisterForm() { const [state, action, pending] = useActionState(registerAction, initialState); // Show success state if registration succeeded and email confirmation is needed if (state && "success" in state && state.emailConfirmationNeeded) { return (
We've sent a confirmation link to your email address. Please click the link to verify your account and start chatting.
Already confirmed?{" "} Log in
Sign up to start chatting with your friends.
Already have an account?{" "} Log in