+ {[...Array(6)].map((_, index) => (
+
setActiveStep(index)}
+ />
+ ))}
+
+ );
+};
+
+export default Stepper;
diff --git a/src/components/shared/index.ts b/src/components/shared/index.ts
index 19fca11..7a3ffd4 100644
--- a/src/components/shared/index.ts
+++ b/src/components/shared/index.ts
@@ -1,5 +1,6 @@
import Button from "./Button";
import InputCompOne from "./InputCompOne";
import FloatLabelInput from "./FloatLabelInput";
+import Stepper from "./Stepper";
-export { Button, FloatLabelInput, InputCompOne };
+export { Button, FloatLabelInput, InputCompOne, Stepper };
diff --git a/src/index.css b/src/index.css
index 296583e..8d31b54 100644
--- a/src/index.css
+++ b/src/index.css
@@ -16,7 +16,4 @@ body {
.containerMode {
@apply container mx-auto px-5 xxs:max-w-full sm:max-w-[98%] lg:max-w-[1100px];
}
- .dash-bg-image{
- background: url('../src/assets/images/dashboard/bg_ellipse1.png') right top no-repeat, url('../src/assets/images/dashboard/bg_ellipse2.png') -8% bottom no-repeat;;
- }
}
\ No newline at end of file
diff --git a/src/layouts/DashboardLayout/Aside.tsx b/src/layouts/DashboardLayout/Aside.tsx
new file mode 100644
index 0000000..56d2673
--- /dev/null
+++ b/src/layouts/DashboardLayout/Aside.tsx
@@ -0,0 +1,183 @@
+import { useState } from "react";
+import { Link, useLocation, useNavigate } from "react-router-dom";
+import Logo from "../../assets/icons/logo.svg";
+import { Icons } from "../../components";
+
+type Props = {
+ asideDisplay?: () => void;
+};
+
+export default function Aside({ asideDisplay }: Props) {
+ const { pathname } = useLocation();
+
+ const navigate = useNavigate();
+
+ const [openNestedLink, setOpenNestedLink] = useState<{ name: string | null }>(
+ { name: "" }
+ );
+
+ const handleOpenNestedLink = (e: any) => {
+ if (!e || !e.target) {
+ return setOpenNestedLink({ name: "" });
+ }
+ if (openNestedLink.name && openNestedLink.name == e.target.name) {
+ setOpenNestedLink({ name: "" });
+ } else {
+ setOpenNestedLink({ name: e.target.name });
+ }
+ };
+
+ return (
+
+
+

+
+
+ {asideLinks.map((link, index) => {
+ if (link.nestedLink?.length) {
+ let allNestedLinks = link.nestedLink.map((item) => item.link);
+ return (
+
+
+
+ {link.nestedLink.map((nextLink, index) => (
+ {
+ asideDisplay && asideDisplay();
+ }}
+ key={index}
+ to={nextLink.link ? nextLink.link : "#"}
+ className={`w-full my-1 flex items-center gap-2 py-2 pl-5 text-base font-medium ${
+ pathname == nextLink.link
+ ? " text-[#5C2684]"
+ : "text-[#585858]"
+ }`}
+ >
+
+ {nextLink.name}
+
+ ))}
+
+
+ );
+ } else {
+ return (
+
{
+ asideDisplay && asideDisplay();
+ }}
+ key={index}
+ to={link.link ? link.link : "#"}
+ className={`w-full my-4 flex items-center gap-2 py-2 pl-5 rounded-lg text-base font-medium ${
+ pathname == link.link ? "text-[#5C2684]" : "text-[#585858]"
+ }`}
+ >
+
+ {link.name}
+
+ );
+ }
+ })}
+
+
+
+
+
+
+
+ For more enquiries and support
+
+
+ Call: 09099000000
+
+
+ Email: fcmbloan@support.com
+
+
+
+
+
+ );
+}
+
+type AsideLinksType = {
+ name: string;
+ link?: string;
+ icon: string;
+ nestedLink?: {
+ name: string;
+ link: string;
+ icon: string;
+ }[];
+}[];
+
+const asideLinks: AsideLinksType = [
+ { name: "Dashboard", link: "/dashboard/home", icon: "dash-icon", nestedLink: [] },
+ {
+ name: "Your Profile",
+ link: "/dashboard/profile",
+ icon: "dash-icon",
+ nestedLink: [],
+ },
+ {
+ name: "Employment Details",
+ link: "/dashboard/verification",
+ icon: "dash-icon",
+ nestedLink: [],
+ },
+ {
+ name: "Reference Details",
+ link: "/dashboard/payments",
+ icon: "dash-icon",
+ nestedLink: [],
+ },
+ {
+ name: "Agreements",
+ link: "/dashboard/legals",
+ icon: "dash-icon",
+ nestedLink: [],
+ },
+ // {name: 'Nested Link', icon: 'home', nestedLink:[
+ // {name: 'Link 2', link: '/dashboard/not-found', icon: 'legals'},
+ // {name: 'Link 1', link: '/dashboard/not-found', icon: 'home'}
+ // ]
+ // },
+];
diff --git a/src/components/DashboardLayout/DashboardAuth.tsx b/src/layouts/DashboardLayout/DashboardAuth.tsx
similarity index 99%
rename from src/components/DashboardLayout/DashboardAuth.tsx
rename to src/layouts/DashboardLayout/DashboardAuth.tsx
index fd9a548..7a7bd45 100644
--- a/src/components/DashboardLayout/DashboardAuth.tsx
+++ b/src/layouts/DashboardLayout/DashboardAuth.tsx
@@ -1,3 +1,4 @@
+
import DashboardLayout from "./DashboardLayout";
import { Outlet } from "react-router-dom";
diff --git a/src/layouts/DashboardLayout/DashboardLayout.tsx b/src/layouts/DashboardLayout/DashboardLayout.tsx
new file mode 100644
index 0000000..944e7ca
--- /dev/null
+++ b/src/layouts/DashboardLayout/DashboardLayout.tsx
@@ -0,0 +1,84 @@
+import { ReactNode, useState, useEffect } from "react";
+
+import Aside from "./Aside";
+
+export default function DashboardLayout({ children }: { children: ReactNode }) {
+ const [showAside, setShowAside] = useState
(false);
+ const asideDisplay = (): void => {
+ setShowAside((prev) => !prev);
+ };
+
+ useEffect(() => {
+ const handleResize = () => {
+ return setShowAside(false);
+ };
+ window.addEventListener("resize", handleResize);
+ return () => {
+ window.removeEventListener("resize", handleResize);
+ };
+ }, []);
+
+ // Assume this interface for ChildProps
+ // interface ChildProps {
+ // customProp?: string;
+ // }
+
+ // const enhanceChildren = React.Children.map(children, (child) => {
+ // if (React.isValidElement(child)) {
+ // return React.cloneElement(child, { customProp: "Hello, World!" });
+ // }
+ // return child;
+ // });
+
+ return (
+
+ );
+}
+
+// {/* */}
diff --git a/src/components/DashboardLayout/index.tsx b/src/layouts/DashboardLayout/index.tsx
similarity index 100%
rename from src/components/DashboardLayout/index.tsx
rename to src/layouts/DashboardLayout/index.tsx
diff --git a/src/layouts/index.ts b/src/layouts/index.ts
index e24576d..8c1a7f0 100644
--- a/src/layouts/index.ts
+++ b/src/layouts/index.ts
@@ -1,4 +1,7 @@
import HomeLayout from "./HomeLayout";
import LetsGetStartedLayout from "./LetsGetStartedLayout";
import GetStartedLayout from "./GetStartedLayout";
-export { HomeLayout, LetsGetStartedLayout, GetStartedLayout };
+import DashboardLayout from "./DashboardLayout/DashboardLayout";
+import { DashboardAuth } from "./DashboardLayout";
+
+export { HomeLayout, LetsGetStartedLayout, GetStartedLayout, DashboardLayout, DashboardAuth };
diff --git a/src/pages/DashboardProfilePage.tsx b/src/pages/DashboardProfilePage.tsx
index cf2ae24..5f8c8ae 100644
--- a/src/pages/DashboardProfilePage.tsx
+++ b/src/pages/DashboardProfilePage.tsx
@@ -1,5 +1,9 @@
+import { DashboardProfile } from "../components";
+
export default function DashboardProfilePage() {
return (
- DashboardProfile
- )
+ <>
+
+ >
+ );
}
diff --git a/src/router/Router.tsx b/src/router/Router.tsx
index 7882f41..b4241e1 100644
--- a/src/router/Router.tsx
+++ b/src/router/Router.tsx
@@ -15,7 +15,7 @@ import {
PersonalBankingPage,
LetsGetStatedPage,
} from "../pages";
-import { DashboardAuth } from "../components";
+import { DashboardAuth } from "../layouts";
const Routers = () => {
return (