"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, ); return (

Create an account

Sign up to start chatting with your friends.

{state?.error ? (

{state.error}

) : null}

Already have an account?{" "} Log in

); }