get started first step added

This commit was merged in pull request #35.
This commit is contained in:
victorAnumudu
2024-04-22 09:36:48 +01:00
parent 94f9803ec5
commit 747c945659
5 changed files with 125 additions and 16 deletions
+11 -11
View File
@@ -4,14 +4,14 @@ import YourAreAlmostThere from "./YourAreAlmostThere";
import LoanAmountComp from "./LoanAmountComp";
import ApplicantsAttestation from "./ApplicantsAttestation";
const GetStarted = () => {
const [step, setStep] = React.useState(1);
const GetStarted = ({handleNextStep, step}:{handleNextStep:any, step:string|number|any}) => {
// const [step, setStep] = React.useState(1);
const handleNextStep = () => {
if (step < 4) {
setStep(step + 1);
}
};
// const handleNextStep = () => {
// if (step < 5) {
// setStep(step + 1);
// }
// };
// const handlePreviousStep: React.MouseEvent<HTMLButtonElement> = () => {
// setStep(step - 1);
@@ -36,16 +36,16 @@ const GetStarted = () => {
<div className="containerMode">
{/* Main */}
<main>
{step === 1 && (
{step === 2 && (
<BasicInfo
inputValues={inputValues}
setInputValues={setInputValues}
handleNextStep={handleNextStep}
/>
)}
{step === 2 && <YourAreAlmostThere handleNextStep={handleNextStep} />}
{step === 3 && <LoanAmountComp handleNextStep={handleNextStep} />}
{step === 4 && <ApplicantsAttestation />}
{step === 3 && <YourAreAlmostThere handleNextStep={handleNextStep} />}
{step === 4 && <LoanAmountComp handleNextStep={handleNextStep} />}
{step === 5 && <ApplicantsAttestation />}
</main>
</div>
</div>