mirror of
https://github.com/lukevella/rallly.git
synced 2025-08-06 09:59:00 +02:00
⚡️ Add support for using SES API (#573)
This commit is contained in:
parent
d5c3017a8b
commit
8ab67683cf
6 changed files with 810 additions and 18 deletions
|
@ -19,9 +19,11 @@ export const UserDetailsForm: React.FunctionComponent<
|
|||
handleSubmit,
|
||||
register,
|
||||
watch,
|
||||
formState: { errors },
|
||||
formState: { errors, isSubmitting, isSubmitSuccessful },
|
||||
} = useForm<UserDetailsData>({ defaultValues });
|
||||
|
||||
const isWorking = isSubmitting || isSubmitSuccessful;
|
||||
|
||||
React.useEffect(() => {
|
||||
if (onChange) {
|
||||
const subscription = watch(onChange);
|
||||
|
@ -44,6 +46,7 @@ export const UserDetailsForm: React.FunctionComponent<
|
|||
className={clsx("input w-full", {
|
||||
"input-error": errors.name,
|
||||
})}
|
||||
disabled={isWorking}
|
||||
placeholder={t("namePlaceholder")}
|
||||
{...register("name", { validate: requiredString })}
|
||||
/>
|
||||
|
@ -58,6 +61,7 @@ export const UserDetailsForm: React.FunctionComponent<
|
|||
className={clsx("input w-full", {
|
||||
"input-error": errors.contact,
|
||||
})}
|
||||
disabled={isWorking}
|
||||
placeholder={t("emailPlaceholder")}
|
||||
{...register("contact", {
|
||||
validate: validEmail,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue