diff --git a/src/components/Partials/MobileSideBar.jsx b/src/components/Partials/MobileSideBar.jsx
index e02b32b..52c9ec2 100644
--- a/src/components/Partials/MobileSideBar.jsx
+++ b/src/components/Partials/MobileSideBar.jsx
@@ -9,6 +9,11 @@ import { useSelector } from "react-redux";
export default function MobileSidebar({ sidebar, action, logoutModalHandler }) {
let { userDetails } = useSelector((state) => state.userDetails);
const darkMode = useContext(DarkModeContext);
+
+ let { jobLists } = useSelector((state) => state.jobLists);
+ const marketData = jobLists?.result_list;
+ let noOfJobs = marketData?.length;
+
return (
{/* logo-area */}
@@ -75,49 +80,20 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler }) {
- -
-
-
-
-
-
- Dashboard
-
-
-
- -
-
-
-
-
-
- Market
-
- 0
-
-
-
-
- -
-
-
-
-
-
- My Task(s)
-
-
-
-
+ {/* Using mini component reduces the bulk amount of html */}
+ {[
+ { name: "Dashboard", path: "/" },
+ { name: "Market", path: "/market", bubble: noOfJobs },
+ { name: "My Task(s)", path: "/mytask" },
+ ].map(({ name, path, bubble }, idx) => (
+
+ ))}
{/*- */}
{/*
);
}
+
+const ListItem = ({ sidebar, route, title, bubble }) => {
+ return (
+
-
+ (navData.isActive ? "active" : ""),
+ sidebar ? "justify-start space-x-3.5" : "justify-center")
+ }`}
+ >
+
+
+
+
+ {title && title}
+ {bubble && (
+
+ {bubble}
+
+ )}
+
+
+
+ );
+};
\ No newline at end of file