import type { FunctionComponent } from "react"; import { Suspense, useEffect, useState } from "react"; import type { BlitzPage, GetServerSideProps } from "blitz"; import { getSession, Routes, useMutation, useRouter } from "blitz"; import clsx from "clsx"; import { useForm } from "react-hook-form"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faQuestionCircle } from "@fortawesome/pro-solid-svg-icons"; import db from "db"; import setTwilioApiFields from "../../mutations/set-twilio-api-fields"; import OnboardingLayout from "../../components/onboarding-layout"; import HelpModal from "../../components/help-modal"; import useCurrentCustomer from "../../../core/hooks/use-current-customer"; type Form = { twilioAccountSid: string; twilioAuthToken: string; }; const StepTwo: BlitzPage = () => { const { register, handleSubmit, setValue, formState: { isSubmitting }, } = useForm