import React from "react"; import Label from "../common/Label"; import { useFormContext } from "react-hook-form"; const ContactInfro = ({ onNext }) => { const { register, control, trigger, formState: { errors }, } = useFormContext(); const handleNext = async () => { const valid = await trigger([ "firstName", "lastName", "email", "contactNumber", "billingAddress", ]); if (valid) { onNext(); // go to next tab } }; return (