diff --git a/src/views/Dashboard/DashboardProject.js b/src/views/Dashboard/DashboardProject.js index 61068f1..27a6402 100644 --- a/src/views/Dashboard/DashboardProject.js +++ b/src/views/Dashboard/DashboardProject.js @@ -126,8 +126,6 @@ const DashboardProject = () => { const [calculationStatus, setCalculationStatus] = useState(false); const [isHierarchy, setIsHierarchy] = useState(false); let history = useHistory(); - let location = useLocation(); - const isDashboardProject = location.pathname.includes('dashboard-project'); useEffect(() => { getProjectDetail(); @@ -358,7 +356,7 @@ const DashboardProject = () => { const getSCurve = async () => { setIsReadySCurve(false); let URL = `${BASE_OSPRO}/api/project/get-s-curve`; - if (SCURVE && SCURVE == "1" && isHierarchy) { + if (SCURVE && SCURVE == "1") { URL = `${BASE_OSPRO}/api/project/calculate-s-curve`; } @@ -1019,7 +1017,7 @@ const DashboardProject = () => { - +
{
- {isDashboardProject ? ( + {SCURVE ? (
{ - {isDashboardProject ? ( + {SCURVE ? (