diff --git a/src/components/Dashboard/DashboardFormInit.tsx b/src/components/Dashboard/DashboardFormInit.tsx index e452de7..e3e4a7d 100644 --- a/src/components/Dashboard/DashboardFormInit.tsx +++ b/src/components/Dashboard/DashboardFormInit.tsx @@ -1,11 +1,16 @@ import { Button, InputCompOne, Stepper } from ".."; -import { useNavigate } from "react-router-dom"; -import { RouteHandler } from "../../router/routes"; +// import { useNavigate } from "react-router-dom"; +// import { RouteHandler } from "../../router/routes"; -export default function DashboardFormInit() { - let navigate = useNavigate(); +type Props = { + handleNextStep:()=>any +} + +export default function DashboardFormInit({handleNextStep}:Props) { + + // let navigate = useNavigate(); + // const navigateToProfile = () => navigate(RouteHandler.dashboardProfile); - const navigateToProfile = () => navigate(RouteHandler.dashboardProfile); return (
@@ -43,7 +48,7 @@ export default function DashboardFormInit() { className="my-8 max-w-[25.875rem] btn-Y text-black w-full h-11" text="Next" type="button" - onClick={navigateToProfile} + onClick={handleNextStep} />
diff --git a/src/components/Dashboard/DashboardHome.tsx b/src/components/Dashboard/DashboardHome.tsx index 5b24265..274e10c 100644 --- a/src/components/Dashboard/DashboardHome.tsx +++ b/src/components/Dashboard/DashboardHome.tsx @@ -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 = () => { const [step, setStep] = React.useState(1); const handleNextStep = () => { - if (step < 2) { + if (step < 7) { setStep(step + 1); } }; return (
- {step === 1 && } - {step === 2 && } + {step === 1 && } + {step === 2 && } + {step === 3 && } + {step === 4 && } + {step === 5 && } + {step === 6 && } + {step === 7 && }
); }; diff --git a/src/components/Dashboard/DashboardHomeIntro.tsx b/src/components/Dashboard/DashboardHomeIntro.tsx index 322ab5d..8fa3345 100644 --- a/src/components/Dashboard/DashboardHomeIntro.tsx +++ b/src/components/Dashboard/DashboardHomeIntro.tsx @@ -69,26 +69,49 @@ export const DashBoardCard: React.FC = ({ interface DashboardHomeIntroProps { handleNextStep: any; + step?:number|string } -const DashboardHomeIntro: FC = ({ handleNextStep }) => { +const DashboardHomeIntro: FC = ({ handleNextStep, step }) => { return ( <> -

Hello, Olanrewaju

-
- -
+ {step == 1 ? + <> +

Hello, Olanrewaju

+
+ +
+ + : + <> +

Welcome Back, Olanrewaju

+
+ +
+ + } ); }; diff --git a/src/components/Dashboard/DashboardProfile.tsx b/src/components/Dashboard/DashboardProfile.tsx index aad44d9..33e187f 100644 --- a/src/components/Dashboard/DashboardProfile.tsx +++ b/src/components/Dashboard/DashboardProfile.tsx @@ -1,21 +1,34 @@ -import { Button, InputCompOne, Stepper } from ".."; +import { InputCompOne } from ".."; + +import { useNavigate } from "react-router-dom"; +import { RouteHandler } from "../../router/routes"; export default function DashboardProfile() { + let navigate = useNavigate(); + const navigateToProfile = () => navigate(RouteHandler.dashboardHome); return (
-
- +
+
-
-
+
+ -
-
- {" "} -
- -
); diff --git a/src/components/Dashboard/home/DashboardHomeAttestation.tsx b/src/components/Dashboard/home/DashboardHomeAttestation.tsx new file mode 100644 index 0000000..db123dc --- /dev/null +++ b/src/components/Dashboard/home/DashboardHomeAttestation.tsx @@ -0,0 +1,46 @@ +import { Button, InputCompOne, Stepper } from '../../shared/index'; +// import { useNavigate } from "react-router-dom"; +// import { RouteHandler } from '../../../router/routes'; + +type Props = { + handleNextStep:()=>any +} + +export default function DashboardHomeAttestation({handleNextStep}:Props) { + // let navigate = useNavigate(); + // const navigateToProfile = () => navigate(RouteHandler.dashboardProfile); + return ( +
+
+ +
+
+

Applicant's Attestation and Debit Instruction

+

NB: Must be your FCMB account number

+
+ +
+
+ +

By pressing, you agree that you have read, understood and accept the applicatant's attestation and terms and conditions for FCMB + premium salary loan. You also give us permission to collect financial information and run credit checks on the account provided through our partners +

+
+
+
+ ); +} diff --git a/src/components/Dashboard/home/DashboardHomeDetail.tsx b/src/components/Dashboard/home/DashboardHomeDetail.tsx new file mode 100644 index 0000000..8542500 --- /dev/null +++ b/src/components/Dashboard/home/DashboardHomeDetail.tsx @@ -0,0 +1,72 @@ +import { Button, InputCompOne, Stepper } from '../../shared/index'; + +type Props = { + handleNextStep:()=>any +} + +export default function DashboardHomeDetail({handleNextStep}:Props) { + return ( +
+
+ +
+
+
+ + +
+
+ {" "} + +
+ +
+
+ ); +} diff --git a/src/components/Dashboard/home/DashboardHomeEmploymentInfo.tsx b/src/components/Dashboard/home/DashboardHomeEmploymentInfo.tsx new file mode 100644 index 0000000..89e3eb4 --- /dev/null +++ b/src/components/Dashboard/home/DashboardHomeEmploymentInfo.tsx @@ -0,0 +1,133 @@ +import { Button, InputCompOne, Stepper } from '../../shared/index'; + +type Props = { + handleNextStep:()=>any +} + +export default function DashboardHomeEmploymentInfo({handleNextStep}:Props) { + return ( +
+
+ +
+
+

Employment Informaton

+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ {" "} + +
+ +
+
+ ); +} diff --git a/src/components/Dashboard/home/DashboardHomeRefereeInfo.tsx b/src/components/Dashboard/home/DashboardHomeRefereeInfo.tsx new file mode 100644 index 0000000..0899dcc --- /dev/null +++ b/src/components/Dashboard/home/DashboardHomeRefereeInfo.tsx @@ -0,0 +1,131 @@ +import { Button, InputCompOne, Stepper } from '../../shared/index'; + +type Props = { + handleNextStep:()=>any +} + +export default function DashboardHomeRefereeInfo({handleNextStep}:Props) { + return ( +
+
+ +
+
+

Reference Details (Must be 18 years and above)

+
+
+

Reference one

+ + + + + +
+
+

Reference one

+ + + + + +
+
+ +
+
+ ); +}