diff --git a/src/components/FamilyAcc/FamilyTable.jsx b/src/components/FamilyAcc/FamilyTable.jsx
index f1e8d91..a3d6dec 100644
--- a/src/components/FamilyAcc/FamilyTable.jsx
+++ b/src/components/FamilyAcc/FamilyTable.jsx
@@ -52,7 +52,7 @@ export default function FamilyTable({ className, familyList, loader }) {
>
-
+
-
+
-
+

{/* 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) => (
+ { name: "Dashboard", path: "/", iconName: "market" },
+ userDetails?.account_type !== "family"
+ ? {
+ name: "Market",
+ path: "/market",
+ bubble: noOfJobs,
+ iconName: "market",
+ }
+ : {},
+ { name: "My Task(s)", path: "/mytask", iconName: "market" },
+ ].map(({ name, path, bubble, iconName }, idx) => (
))}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* Messages*/}
- {/* */}
- {/* */}
- {/**/}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* My Wallet*/}
- {/* */}
- {/* */}
- {/**/}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* Resources*/}
- {/* */}
- {/* */}
- {/**/}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* History*/}
- {/* */}
- {/* */}
- {/**/}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* Refer a Friend*/}
- {/* */}
- {/* */}
- {/**/}
- {!userDetails.post_jobs ? (
-
-
-
-
- Enable Job Post
-
-
-
-
- ) : jobLists?.result_list?.length ? (
-
-
- My Jobs
-
-
-
- -
-
-
-
-
-
- My Jobs
-
-
-
- -
-
-
-
-
-
- Pending
-
-
-
- -
-
-
-
-
-
- Active Job(s)
-
-
-
-
-
-
- ) : (
-
-
- My Jobs
-
-
-
- -
-
-
-
-
-
- My Jobs
-
-
-
-
-
-
+ {userDetails?.account_type !== "family" && (
+ <>
+ {!userDetails?.post_jobs ? (
+
+ {/* menus item */}
+
+
+
+
+ Job Post
+
+
+
+ -
+ (navData.isActive ? "active" : ""),
+ sidebar
+ ? "justify-start space-x-3.5"
+ : "justify-center")
+ }`}
+ >
+
+
+
+
+ Enable Job Post
+
+
+
+
+
+
+
+ ) : jobLists?.result_list?.length ? (
+
+
+
+ My Jobs
+
+
+
+
+ {[
+ { name: "List", path: "/myjobs", iconName: "people-two" },
+ {
+ name: "Pending",
+ path: "/my-pending-jobs",
+ iconName: "people-two",
+ },
+ {
+ name: "Active",
+ path: "/my-active-jobs",
+ iconName: "people-two",
+ },
+ ].map(({ name, path, iconName }, idx) => (
+
+ ))}
+
+
+
+ ) : (
+
+ )}
+ >
)}
{/* signout area */}
diff --git a/src/components/Partials/Sidebar.jsx b/src/components/Partials/Sidebar.jsx
index 0bb50a2..670a022 100644
--- a/src/components/Partials/Sidebar.jsx
+++ b/src/components/Partials/Sidebar.jsx
@@ -10,6 +10,7 @@ export default function Sidebar({ sidebar, action, logoutModalHandler }) {
const darkMode = useContext(DarkModeContext);
let { userDetails } = useSelector((state) => state.userDetails);
+ console.log(userDetails);
//const jobLists = getJobList(); // pass from upper - we need in a lot of places
let { jobLists } = useSelector((state) => state.jobLists);
const marketData = jobLists?.result_list;
@@ -103,185 +104,69 @@ export default function Sidebar({ sidebar, action, logoutModalHandler }) {
{/* 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) => (
+ { name: "Dashboard", path: "/", iconName: "market" },
+ userDetails?.account_type !== "family"
+ ? {
+ name: "Market",
+ path: "/market",
+ bubble: noOfJobs,
+ iconName: "market",
+ }
+ : {},
+ { name: "My Task(s)", path: "/mytask", iconName: "market" },
+ ].map(({ name, path, bubble, iconName }, idx) => (
))}
- {/*- */}
- {/* (navData.isActive ? "active" : ""),*/}
- {/* sidebar ? "justify-start space-x-3.5" : "justify-center")*/}
- {/* }`}*/}
- {/* >*/}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* Messages*/}
- {/* */}
- {/* */}
- {/*
*/}
- {/*- */}
- {/* (navData.isActive ? "active" : ""),*/}
- {/* sidebar ? "justify-start space-x-3.5" : "justify-center")*/}
- {/* }`}*/}
- {/* >*/}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* My Wallet*/}
- {/* */}
- {/* */}
- {/*
*/}
- {/*- */}
- {/* (navData.isActive ? "active" : ""),*/}
- {/* sidebar ? "justify-start space-x-3.5" : "justify-center")*/}
- {/* }`}*/}
- {/* >*/}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* Resources*/}
- {/* */}
- {/* */}
- {/*
*/}
-
- {/*- */}
- {/* (navData.isActive ? "active" : ""),*/}
- {/* sidebar ? "justify-start space-x-3.5" : "justify-center")*/}
- {/* }`}*/}
- {/* >*/}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* History*/}
- {/* */}
- {/* */}
- {/*
*/}
-
- {/*- */}
- {/* (navData.isActive ? "active" : ""),*/}
- {/* sidebar ? "justify-start space-x-3.5" : "justify-center")*/}
- {/* }`}*/}
- {/* >*/}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* Refer a Friend*/}
- {/* */}
- {/* */}
- {/*
*/}
- {/*
-
-
-
- Family Account
-
-
-
- */}
-
{/* menu and settings item */}
-
- {/* menus item */}
-
- {/*
-
-
- Family Corner
-
-
- */}
-
+ {userDetails?.account_type !== "family" && (
+
+ {/* menus item */}
+
+
- Family
+
+ Family
+
- -
- (navData.isActive ? "active" : ""),
- sidebar ? "justify-start space-x-3.5" : "justify-center")
- }`}
- >
-
-
-
-
- Family Corner
-
-
-
+
+
-
+ )}
- {!userDetails.post_jobs ? (
-
-
- {/* menus item */}
-
- {/*
+ {userDetails?.account_type !== "family" && (
+ <>
+ {!userDetails?.post_jobs ? (
+
+ {/* menus item */}
+
+ {/*
@@ -290,175 +175,92 @@ export default function Sidebar({ sidebar, action, logoutModalHandler }) {
*/}
-
-
- Job Post
+
+
+
+ Job Post
+
+
+
+ -
+ (navData.isActive ? "active" : ""),
+ sidebar
+ ? "justify-start space-x-3.5"
+ : "justify-center")
+ }`}
+ >
+
+
+
+
+ Enable Job Post
+
+
+
+
+
-
- -
- (navData.isActive ? "active" : ""),
- sidebar ? "justify-start space-x-3.5" : "justify-center")
- }`}
- >
-
-
-
-
- Enable Job Post
-
-
-
-
-
-
- ) : jobLists?.result_list?.length ? (
-
-
- My Jobs
-
-
-
- -
- (navData.isActive ? "active" : ""),
- sidebar ? "justify-start space-x-3.5" : "justify-center")
- }`}
- >
-
-
-
-
- List
-
-
-
- -
- (navData.isActive ? "active" : ""),
- sidebar ? "justify-start space-x-3.5" : "justify-center")
- }`}
- >
-
-
-
-
- Pending
-
-
-
- -
- (navData.isActive ? "active" : ""),
- sidebar ? "justify-start space-x-3.5" : "justify-center")
- }`}
- >
-
-
-
-
- Active
-
-
-
- {/*- */}
- {/* (navData.isActive ? "active" : ""),*/}
- {/* sidebar ? "justify-start space-x-3.5" : "justify-center")*/}
- {/* }`}*/}
- {/* >*/}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* My Profile*/}
- {/* */}
- {/* */}
- {/*
*/}
- {/*- */}
- {/* (navData.isActive ? "active" : ""),*/}
- {/* sidebar ? "justify-start space-x-3.5" : "justify-center")*/}
- {/* }`}*/}
- {/* >*/}
- {/* */}
- {/* */}
- {/* */}
- {/* */}
- {/* Settings*/}
- {/* */}
- {/* */}
- {/*
*/}
-
-
-
- ) : (
-
-
- My Jobs
-
-
-
- -
- (navData.isActive ? "active" : ""),
- sidebar ? "justify-start space-x-3.5" : "justify-center")
- }`}
- >
-
-
-
-
- Add Job
-
-
-
-
-
-
+ ) : jobLists?.result_list?.length ? (
+
+
+
+ My Jobs
+
+
+
+
+ {[
+ { name: "List", path: "/myjobs", iconName: "people-two" },
+ {
+ name: "Pending",
+ path: "/my-pending-jobs",
+ iconName: "people-two",
+ },
+ {
+ name: "Active",
+ path: "/my-active-jobs",
+ iconName: "people-two",
+ },
+ ].map(({ name, path, iconName }, idx) => (
+
+ ))}
+
+
+
+ ) : (
+
+ )}
+ >
)}
{/* signout area */}
@@ -526,7 +328,7 @@ export default function Sidebar({ sidebar, action, logoutModalHandler }) {
);
}
-const ListItem = ({ sidebar, route, title, bubble }) => {
+const ListItem = ({ sidebar, route, title, bubble, iconName }) => {
return (
{
}`}
>
-
+
|