"use client" import { useActionState } from "react" import Input from "@modules/common/components/input" import { LOGIN_VIEW } from "@modules/account/templates/login-template" import ErrorMessage from "@modules/checkout/components/error-message" import { SubmitButton } from "@modules/checkout/components/submit-button" import LocalizedClientLink from "@modules/common/components/localized-client-link" import { signup } from "@lib/data/customer" type Props = { setCurrentView: (view: LOGIN_VIEW) => void } const Register = ({ setCurrentView }: Props) => { const [message, formAction] = useActionState(signup, null) return (
Create your Medusa Store Member profile, and get access to an enhanced shopping experience.
{message?.state === "verification_required" && (