From 452bb73bef5bcf02c4d5b43ac87fded8fdc95317 Mon Sep 17 00:00:00 2001 From: Ebube Date: Fri, 23 Jun 2023 21:42:26 +0100 Subject: [PATCH] AddJob_Link Fix --- src/components/MyJobs/index.jsx | 4 +++- src/components/Partials/MobileSideBar.jsx | 6 ++++-- src/components/Partials/Sidebar.jsx | 6 ++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/components/MyJobs/index.jsx b/src/components/MyJobs/index.jsx index e3d9458..1f15cf8 100644 --- a/src/components/MyJobs/index.jsx +++ b/src/components/MyJobs/index.jsx @@ -1,11 +1,13 @@ import React, { useState } from "react"; +import { useLocation } from "react-router-dom"; import Layout from "../Partials/Layout"; import MyJobTable from "./MyJobTable"; import CommonHead from "../UserHeader/CommonHead"; import AddJobPage from "../../views/AddJobPage"; export default function MyJobs(props) { - const [popUp, setPopUp] = useState(false); + let { state } = useLocation(); + const [popUp, setPopUp] = useState(state?.popup ? true : false); const popUpHandler = () => { setPopUp((prev) => !prev); }; diff --git a/src/components/Partials/MobileSideBar.jsx b/src/components/Partials/MobileSideBar.jsx index 067f1cb..486f555 100644 --- a/src/components/Partials/MobileSideBar.jsx +++ b/src/components/Partials/MobileSideBar.jsx @@ -225,9 +225,10 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler, myJ @@ -301,11 +302,12 @@ export default function MobileSidebar({ sidebar, action, logoutModalHandler, myJ ); } -const ListItem = ({ sidebar, route, title, bubble }) => { +const ListItem = ({ sidebar, route, title, bubble, state }) => { return (
  • (navData.isActive ? "active" : ""), sidebar ? "justify-start space-x-3.5" : "justify-center") diff --git a/src/components/Partials/Sidebar.jsx b/src/components/Partials/Sidebar.jsx index e909170..5f7bbb9 100644 --- a/src/components/Partials/Sidebar.jsx +++ b/src/components/Partials/Sidebar.jsx @@ -249,9 +249,10 @@ export default function Sidebar({ sidebar, action, logoutModalHandler, myJobList
    @@ -325,11 +326,12 @@ export default function Sidebar({ sidebar, action, logoutModalHandler, myJobList ); } -const ListItem = ({ sidebar, route, title, bubble, iconName }) => { +const ListItem = ({ sidebar, route, title, bubble, iconName, state }) => { return (
  • (navData.isActive ? "active" : ""), sidebar ? "justify-start space-x-3.5" : "justify-center")