added steps to loan application
This commit was merged in pull request #36.
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import React, { FC } from "react";
|
||||
import DashboardHomeIntro from "./DashboardHomeIntro";
|
||||
import DashboardFormInit from "./DashboardFormInit";
|
||||
import DashboardHomeDetail from "./home/DashboardHomeDetail";
|
||||
import DashboardHomeEmploymentInfo from "./home/DashboardHomeEmploymentInfo";
|
||||
import DashboardHomeRefereeInfo from "./home/DashboardHomeRefereeInfo";
|
||||
import DashboardHomeAttestation from "./home/DashboardHomeAttestation";
|
||||
|
||||
interface DashboardHomeProps {}
|
||||
|
||||
@@ -8,15 +12,20 @@ const DashboardHome: FC<DashboardHomeProps> = () => {
|
||||
const [step, setStep] = React.useState(1);
|
||||
|
||||
const handleNextStep = () => {
|
||||
if (step < 2) {
|
||||
if (step < 7) {
|
||||
setStep(step + 1);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="w-full">
|
||||
{step === 1 && <DashboardHomeIntro handleNextStep={handleNextStep} />}
|
||||
{step === 2 && <DashboardFormInit />}
|
||||
{step === 1 && <DashboardHomeIntro step={step} handleNextStep={handleNextStep} />}
|
||||
{step === 2 && <DashboardFormInit handleNextStep={handleNextStep} />}
|
||||
{step === 3 && <DashboardHomeDetail handleNextStep={handleNextStep} />}
|
||||
{step === 4 && <DashboardHomeEmploymentInfo handleNextStep={handleNextStep} />}
|
||||
{step === 5 && <DashboardHomeRefereeInfo handleNextStep={handleNextStep} />}
|
||||
{step === 6 && <DashboardHomeAttestation handleNextStep={handleNextStep} />}
|
||||
{step === 7 && <DashboardHomeIntro step={step} handleNextStep={handleNextStep} />}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user