import React, { useContext } from "react";
import { NavLink } from "react-router-dom";
import logo from "../../assets/images/wrenchboard.png"; //logo-2.svg";
import logo3 from "../../assets/images/wrenchboard.png"; //logo-3.svg";
import DarkModeContext from "../Contexts/DarkModeContext";
import Icons from "../Helpers/Icons";
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 <= 0 ? "0" : marketData?.length;
return (
{/* logo-area */}
{darkMode.theme === "light" ? (

) : (

)}
{/* menu and settings item */}
{/* menus item */}
Menu
{/* 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) => (
))}
{/*- */}
{/* */}
{/* */}
{/* */}
{/* */}
{/* */}
{/* Messages*/}
{/* */}
{/* */}
{/*
*/}
{/*- */}
{/* */}
{/* */}
{/* */}
{/* */}
{/* */}
{/* My Wallet*/}
{/* */}
{/* */}
{/*
*/}
{/*- */}
{/* */}
{/* */}
{/* */}
{/* */}
{/* */}
{/* Resources*/}
{/* */}
{/* */}
{/*
*/}
{/*- */}
{/* */}
{/* */}
{/* */}
{/* */}
{/* */}
{/* History*/}
{/* */}
{/* */}
{/*
*/}
{/*- */}
{/* */}
{/* */}
{/* */}
{/* */}
{/* */}
{/* Refer a Friend*/}
{/* */}
{/* */}
{/*
*/}
{!userDetails.post_jobs ? (
) : jobLists?.result_list?.length ? (
My Jobs
-
My Jobs
-
Pending
-
Active Job(s)
) : (
)}
{/* signout area */}
{sidebar ? (
) : (
)}
);
}
const ListItem = ({ sidebar, route, title, bubble }) => {
return (
(navData.isActive ? "active" : ""),
sidebar ? "justify-start space-x-3.5" : "justify-center")
}`}
>
{title && title}
{bubble && (
{bubble}
)}
);
};