mirror of
https://github.com/lukevella/rallly.git
synced 2025-08-01 23:48:53 +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
16
apps/web/declarations/environment.d.ts
vendored
16
apps/web/declarations/environment.d.ts
vendored
|
@ -68,6 +68,22 @@ declare global {
|
|||
* "true" to require authentication for creating new polls and accessing admin pages
|
||||
*/
|
||||
AUTH_REQUIRED?: string;
|
||||
/**
|
||||
* Determines what email provider to use. "smtp" or "ses"
|
||||
*/
|
||||
EMAIL_PROVIDER?: "smtp" | "ses";
|
||||
/**
|
||||
* AWS access key ID
|
||||
*/
|
||||
AWS_ACCESS_KEY_ID?: string;
|
||||
/**
|
||||
* AWS secret access key
|
||||
*/
|
||||
AWS_SECRET_ACCESS_KEY?: string;
|
||||
/**
|
||||
* AWS region
|
||||
*/
|
||||
AWS_REGION?: string;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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