form validation with formik

This commit was merged in pull request #41.
This commit is contained in:
victorAnumudu
2024-04-24 11:42:04 +01:00
parent 4b008f6785
commit 2cb5c471f6
13 changed files with 977 additions and 804 deletions
-28
View File
@@ -1,35 +1,9 @@
import React from "react";
import BasicInfo from "./BasicInfo";
import YourAreAlmostThere from "./YourAreAlmostThere";
import LoanAmountComp from "./LoanAmountComp";
import ApplicantsAttestation from "./ApplicantsAttestation";
const GetStarted = ({handleNextStep, step}:{handleNextStep:any, step:string|number|any}) => {
// const [step, setStep] = React.useState(1);
// const handleNextStep = () => {
// if (step < 5) {
// setStep(step + 1);
// }
// };
// const handlePreviousStep: React.MouseEvent<HTMLButtonElement> = () => {
// setStep(step - 1);
// };
const [inputValues, setInputValues] = React.useState({
title: "",
marital: "",
agentId: "",
bvn: "",
firstName: "",
phone: "",
email: "",
surname: "",
dob: "",
secondName: "",
spouseBVN: "",
});
return (
<div className="w-full flex items-center justify-center">
@@ -38,8 +12,6 @@ const GetStarted = ({handleNextStep, step}:{handleNextStep:any, step:string|numb
<main>
{step === 2 && (
<BasicInfo
inputValues={inputValues}
setInputValues={setInputValues}
handleNextStep={handleNextStep}
/>
)}