From 9d8f2013456d5027f2fc1184b83de8506dd6e1a6 Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Sun, 2 Jul 2023 13:51:57 +0700 Subject: [PATCH] Initial linear curve --- src/containers/DefaultLayout/DefaultLayout.js | 21 ++++++++++-- src/routes.js | 1 + src/views/Dashboard/DashboardProject.js | 21 +++++++++++- .../SimproV2/CreatedProyek/DialogHierarchy.js | 1 + src/views/SimproV2/CreatedProyek/index.js | 34 +++++++++++++++++-- 5 files changed, 72 insertions(+), 6 deletions(-) diff --git a/src/containers/DefaultLayout/DefaultLayout.js b/src/containers/DefaultLayout/DefaultLayout.js index 280fa71..0ef378c 100644 --- a/src/containers/DefaultLayout/DefaultLayout.js +++ b/src/containers/DefaultLayout/DefaultLayout.js @@ -1,5 +1,5 @@ import React, { Component, Suspense, Divider } from 'react'; -import { Redirect, Route, Switch } from 'react-router-dom'; +import { Redirect, Route, Switch, withRouter } from 'react-router-dom'; import * as router from 'react-router-dom'; import { Button, Container, UncontrolledDropdown, DropdownItem, DropdownMenu, DropdownToggle, Nav, NavItem } from 'reactstrap'; import axios from 'axios'; @@ -229,10 +229,25 @@ class DefaultLayout extends Component { } render() { + const { location } = this.props; + const { pathname } = location; + let renderSidebar = false + + if (pathname.includes("/dashboard-project")) { + // Remove the base URL and hash + const path = pathname.replace("/dashboard-project/", ""); + + // Split the remaining path by "/" + const parts = path.split("/"); + if (parts[2] == "1") { + renderSidebar = true + } + } + return (
- {!window.location.href.includes("dashboard-project") ? ( + {!window.location.href.includes("dashboard-project") || renderSidebar ? ( {/*