side menu display bug fixed
This commit was merged in pull request #119.
This commit is contained in:
@@ -36,7 +36,7 @@ export default function Layout({ children }) {
|
||||
//---------------------------------------
|
||||
/* LET U DEAL WITH JOB LIST - we need to centralize this list */
|
||||
const {jobListTable} = useSelector((state) => state.tableReload)
|
||||
const [MyJobList, setMyJobList] = useState({loading: true, data:[]});
|
||||
const [myJobList, setMyJobList] = useState({loading: true, data:[]});
|
||||
const api = new usersService();
|
||||
|
||||
const getMyJobList = async () => {
|
||||
@@ -75,6 +75,7 @@ export default function Layout({ children }) {
|
||||
logoutModalHandler={logoutModalHandler}
|
||||
sidebar={drawer}
|
||||
action={() => dispatch(drawerToggle())}
|
||||
myJobList={myJobList}
|
||||
/>
|
||||
</div>
|
||||
{MobileSideBar && (
|
||||
@@ -92,6 +93,7 @@ export default function Layout({ children }) {
|
||||
logoutModalHandler={logoutModalHandler}
|
||||
sidebar={MobileSideBar}
|
||||
action={() => setMobileSidebar.toggle()}
|
||||
myJobList={myJobList}
|
||||
/>
|
||||
</div>
|
||||
{/* end sidebar */}
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
import DarkModeContext from "../Contexts/DarkModeContext";
|
||||
import Icons from "../Helpers/Icons";
|
||||
|
||||
export default function MobileSidebar({ sidebar, action, logoutModalHandler }) {
|
||||
export default function MobileSidebar({ sidebar, action, logoutModalHandler, myJobList }) {
|
||||
let { userDetails } = useSelector((state) => state.userDetails);
|
||||
const darkMode = useContext(DarkModeContext);
|
||||
|
||||
@@ -180,7 +180,7 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler }) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
) : jobLists?.result_list?.length ? (
|
||||
) : myJobList?.data?.result_list?.length ? (
|
||||
<div className="setting-item">
|
||||
<div className="heading mb-5">
|
||||
<h1 className="title text-xl font-bold text-purple">
|
||||
@@ -213,7 +213,7 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler }) {
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
) : !myJobList?.loading && (
|
||||
<div className="setting-item">
|
||||
<div className="heading mb-5">
|
||||
<h1 className="title text-xl font-bold text-purple">
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
import DarkModeContext from "../Contexts/DarkModeContext";
|
||||
import Icons from "../Helpers/Icons";
|
||||
|
||||
export default function Sidebar({ sidebar, action, logoutModalHandler }) {
|
||||
export default function Sidebar({ sidebar, action, logoutModalHandler, myJobList }) {
|
||||
const darkMode = useContext(DarkModeContext);
|
||||
|
||||
let { userDetails } = useSelector((state) => state.userDetails);
|
||||
@@ -200,7 +200,7 @@ export default function Sidebar({ sidebar, action, logoutModalHandler }) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
) : jobLists?.result_list?.length ? (
|
||||
) : myJobList?.data?.result_list?.length ? (
|
||||
<>
|
||||
<div className="setting-item">
|
||||
<div className="heading mb-5">
|
||||
@@ -239,7 +239,7 @@ export default function Sidebar({ sidebar, action, logoutModalHandler }) {
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
) : !myJobList?.loading && (
|
||||
<div className="setting-item">
|
||||
<div className="heading mb-5">
|
||||
<h1 className="title text-xl font-bold text-purple">
|
||||
|
||||
Reference in New Issue
Block a user