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 { IoHelpCircle } from "react-icons/io5"; 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 useCurrentUser from "../../../core/hooks/use-current-user"; type Form = { twilioAccountSid: string; twilioAuthToken: string; }; const StepTwo: BlitzPage = () => { const { register, handleSubmit, setValue, formState: { isSubmitting }, } = useForm