import type { FunctionComponent } from "react"; import { useEffect, useState } from "react"; import { useRouter } from "blitz"; import { useForm } from "react-hook-form"; import Alert from "./alert"; import Button from "./button"; import SettingsSection from "./settings-section"; import useCurrentCustomer from "../../core/hooks/use-current-customer"; import appLogger from "../../../integrations/logger"; type Form = { name: string; email: string; }; const logger = appLogger.child({ module: "profile-settings" }); const ProfileInformations: FunctionComponent = () => { const { customer } = useCurrentCustomer(); const router = useRouter(); const { register, handleSubmit, setValue, formState: { isSubmitting, isSubmitSuccessful }, } = useForm