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 (