Feat/verify phone number (#6035)
* first implementation of verifying phone number * add UI + logic for verifying phone number flow * check if all phone numbers are verified before submit * add numberVerification pending * only send SMS to verified numbers * fix design for mobile view * check if phone number is verified before testing action * add back message service id check * add TWILIO_VERIFY_SID to .env.example * code clean up * add TWILIO_VERIFY_SID to README.md instructions * save new verified numbers * fix wrongly thrown error for new verified numbers * use false as default value for isVerificationPending paramater * add translations * add migration file * code clean up * don't throw error if phone number is not needed * Feedback * Shows error when Twillio isn't properly setup * Type fixes Co-authored-by: CarinaWolli <[email protected]> Co-authored-by: zomars <[email protected]> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
15 files changed
+316
-43
No files matched your search
@@ -9,15 +9,22 @@ export type PhoneInputProps<FormValues> = Props<
|
||||
required: boolean;
|
||||
},
|
||||
FormValues
|
||||
>;
|
||||
> & { onChange?: (e: any) => void };
|
||||
|
||||
function PhoneInput<FormValues>({ control, name, className, ...rest }: PhoneInputProps<FormValues>) {
|
||||
function PhoneInput<FormValues>({
|
||||
control,
|
||||
name,
|
||||
className,
|
||||
onChange,
|
||||
...rest
|
||||
}: PhoneInputProps<FormValues>) {
|
||||
return (
|
||||
<BasePhoneInput
|
||||
{...rest}
|
||||
international
|
||||
name={name}
|
||||
control={control}
|
||||
onChange={onChange}
|
||||
countrySelectProps={{ className: "text-black" }}
|
||||
numberInputProps={{
|
||||
className: "border-0 text-sm focus:ring-0 dark:bg-darkgray-100 dark:placeholder:text-darkgray-600",
|
||||
|
||||
Reference in new issue
Block a user