diff --git a/.env b/.env
index 4fd8113..f6cef28 100644
--- a/.env
+++ b/.env
@@ -108,4 +108,7 @@ REACT_APP_APPLE_APP='https://itunes.apple.com/us/app/wrenchboard/id1435718367?ls
REACT_APP_SHOW_NEW_FAMILY_DASH=1
# Displays the account dashboard
-REACT_APP_SHOW_ACCOUNT_DASH=1
\ No newline at end of file
+REACT_APP_SHOW_ACCOUNT_DASH=1
+
+# Displays the slider banners
+REACT_APP_SHOW_SLIDER_BANNERS=0
\ No newline at end of file
diff --git a/.env.development b/.env.development
index f5bc221..2c56608 100644
--- a/.env.development
+++ b/.env.development
@@ -76,4 +76,7 @@ REACT_APP_APPLE_APP='https://itunes.apple.com/us/app/wrenchboard/id1435718367?ls
REACT_APP_SHOW_NEW_FAMILY_DASH=1
# Displays the account dashboard
-REACT_APP_SHOW_ACCOUNT_DASH=1
\ No newline at end of file
+REACT_APP_SHOW_ACCOUNT_DASH=1
+
+# Displays the slider banners
+REACT_APP_SHOW_SLIDER_BANNERS=0
\ No newline at end of file
diff --git a/.env.production b/.env.production
index 70d18a3..8edd0e7 100644
--- a/.env.production
+++ b/.env.production
@@ -82,4 +82,7 @@ REACT_APP_APPLE_APP='https://itunes.apple.com/us/app/wrenchboard/id1435718367?ls
REACT_APP_SHOW_NEW_FAMILY_DASH=1
# Displays the account dashboard
-REACT_APP_SHOW_ACCOUNT_DASH=1
\ No newline at end of file
+REACT_APP_SHOW_ACCOUNT_DASH=1
+
+# Displays the slider banners
+REACT_APP_SHOW_SLIDER_BANNERS=0
\ No newline at end of file
diff --git a/src/components/FamilyAcc/FamilyTable.jsx b/src/components/FamilyAcc/FamilyTable.jsx
index 8888c3e..7ffac96 100644
--- a/src/components/FamilyAcc/FamilyTable.jsx
+++ b/src/components/FamilyAcc/FamilyTable.jsx
@@ -16,7 +16,7 @@ import localImgLoad from "../../lib/localImgLoad";
*/
export default function FamilyTable({
className,
- familyList,
+ familyList = [],
loader,
popUpHandler,
imageServer,
@@ -184,7 +184,7 @@ export default function FamilyTable({
) : (
<>
- {familyList?.length > 0 ? (
+ {familyList?. > 0 ? (
diff --git a/src/components/FamilyAcc/index.jsx b/src/components/FamilyAcc/index.jsx
index 99f48af..0c88965 100644
--- a/src/components/FamilyAcc/index.jsx
+++ b/src/components/FamilyAcc/index.jsx
@@ -7,6 +7,7 @@ import React, {
} from "react";
import { Link } from "react-router-dom";
import usersService from "../../services/UsersService";
+import Icons from "../Helpers/Icons";
import InputCom from "../Helpers/Inputs/InputCom";
import ModalCom from "../Helpers/ModalCom";
import Layout from "../Partials/Layout";
@@ -150,31 +151,44 @@ export default function FamilyAcc() {
)}
-
-
-
+
+
+
}>
{
const darkMode = useContext(DarkModeContext);
-
- let { userDetails } = useSelector((state) => state.userDetails);
- //const jobLists = getJobList(); // pass from upper - we need in a lot of places
- let { jobLists } = useSelector((state) => state.jobLists);
+ const { userDetails } = useSelector((state) => state.userDetails);
+ const { jobLists } = useSelector((state) => state.jobLists);
const marketData = jobLists?.result_list;
- let noOfJobs = marketData?.length <= 0 ? "0" : marketData?.length;
+ const noOfJobs = marketData?.length || 0;
useEffect(() => {
const title = document.querySelectorAll(".menu-setting-items .heading");
- if (sidebar) {
- title.forEach((elm) => {
- elm.classList.add("active");
- });
- } else {
- title.forEach((elm) => {
- elm.classList.remove("active");
- });
- }
- }, [jobLists]);
+ title.forEach((elm) => {
+ sidebar ? elm.classList.add("active") : elm.classList.remove("active");
+ });
+ }, [sidebar, jobLists]);
+
return (
- {/* logo-area */}
- {darkMode.theme === "light" ? (
-

- ) : (
-

- )}
+
-
-
+
- {/* menu and settings item */}
+
- {/* menus item */}
- {/* Using mini component reduces the bulk amount of html */}
)}
-
- {/* menu and settings item */}
{userDetails?.account_type !== "FAMILY" && (
)}
+
{userDetails?.account_type !== "FAMILY" && (
<>
{!userDetails?.post_jobs ? (
@@ -172,28 +112,12 @@ export default function Sidebar({
- -
- (navData.isActive ? "active" : ""),
- sidebar
- ? "justify-start space-x-3.5"
- : "justify-center")
- }`}
- >
-
-
-
-
- Enable Job Post
-
-
-
+
@@ -211,11 +135,7 @@ export default function Sidebar({
{[
- {
- name: "List",
- path: "/myjobs",
- iconName: "job-list",
- },
+ { name: "List", path: "/myjobs", iconName: "job-list" },
{
name: "Waiting",
path: "/pend-interest",
@@ -261,7 +181,7 @@ export default function Sidebar({
route="/myjobs"
iconName="people-two"
sidebar={sidebar}
- popup={true}
+ popup
/>
@@ -270,51 +190,42 @@ export default function Sidebar({
>
)}
- {/* signout area */}
- {sidebar ? (
+
+
- ) : (
-
- )}
+
);
-}
+};
+
+export default Sidebar;
const ListItem = ({ sidebar, route, title, bubble, iconName, popup }) => {
return (
-
+
(navData.isActive ? "active" : ""),
- sidebar ? "justify-start space-x-3.5" : "justify-center")
- }`}
+ className={`nav-item flex items-center ${
+ sidebar ? "justify-start space-x-3.5" : "justify-center"
+ } ${(navData) => (navData.isActive ? "active" : "")}`}
>
-
+
{
sidebar ? "active flex-1" : "w-0"
}`}
>
- {title && title}
+ {title}
{bubble && (
{bubble}
@@ -333,3 +244,48 @@ const ListItem = ({ sidebar, route, title, bubble, iconName, popup }) => {
);
};
+
+const SidebarToggleIcon = () => (
+
+);
diff --git a/src/components/UserHeader/CommonHead.jsx b/src/components/UserHeader/CommonHead.jsx
index 61c0ac1..ac3fa70 100644
--- a/src/components/UserHeader/CommonHead.jsx
+++ b/src/components/UserHeader/CommonHead.jsx
@@ -1,37 +1,18 @@
import React from "react";
-import { Link } from "react-router-dom";
import RecomendedSliders from "./RecomendedSliders";
-export default function CommonHead({ className, commonHeadData }) {
+export default function CommonHead({ className = "", commonHeadData = [] }) {
return (
-
- {commonHeadData?.length > 0 && (
-
+ <>
+ {process.env.REACT_APP_SHOW_SLIDER_BANNERS === "1" && (
+
+ {commonHeadData?.length > 0 && (
+
+ )}
+
)}
- {/*
*/}
- {/* /!*
*!/*/}
- {/* /!* This is common head which will appear as needed , will take many shape*!/*/}
- {/* /!*
*!/*/}
- {/* /!*
*!/*/}
- {/* /!* some space for extra texts here*!/*/}
- {/* /!*
*!/*/}
- {/* */}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/* */}
- {/* View Task*/}
- {/* */}
-
- {/*
*/}
- {/*
*/}
-
+ >
);
}