diff --git a/src/components/Tables/TablesTableRow.js b/src/components/Tables/TablesTableRow.js index c440bf4..4eba9cc 100644 --- a/src/components/Tables/TablesTableRow.js +++ b/src/components/Tables/TablesTableRow.js @@ -102,7 +102,7 @@ function TablesTableRow(props) { setAllData={setAllData} userStatus={userStatus} setUserStatus={setUserStatus} - /> + /> ) : ( { - return window.location.pathname !== '/admin/full-screen-maps'; - }; - const getActiveRoute = (routes) => { - let activeRoute = 'Default Brand Text'; - for (let i = 0; i < routes.length; i++) { - if (routes[i].collapse) { - let collapseActiveRoute = getActiveRoute(routes[i].views); - if (collapseActiveRoute !== activeRoute) { - return collapseActiveRoute; - } - } else if (routes[i].category) { - let categoryActiveRoute = getActiveRoute(routes[i].views); - if (categoryActiveRoute !== activeRoute) { - return categoryActiveRoute; - } - } else { - if (window.location.href.indexOf(routes[i].layout + routes[i].path) !== -1) { - return routes[i].name; - } - } - } - return activeRoute; - }; - // This changes navbar state(fixed or not) - const getActiveNavbar = (routes) => { - let activeNavbar = false; - for (let i = 0; i < routes.length; i++) { - if (routes[i].category) { - let categoryActiveNavbar = getActiveNavbar(routes[i].views); - if (categoryActiveNavbar !== activeNavbar) { - return categoryActiveNavbar; - } - } else { - if (window.location.href.indexOf(routes[i].layout + routes[i].path) !== -1) { - if (routes[i].secondaryNavbar) { - return routes[i].secondaryNavbar; - } - } - } - } - return activeNavbar; - }; - const getRoutes = (routes) => { - return routes.map((prop, key) => { - if (prop.collapse) { - return getRoutes(prop.views); - } - if (prop.category === 'account') { - return getRoutes(prop.views); - } - if (prop.layout === '/admin') { - return ; - } else { - return null; - } - }); - }; - const { isOpen, onOpen, onClose } = useDisclosure(); - document.documentElement.dir = 'ltr'; - // Chakra Color Mode - return ( - - - - - {/* { + return window.location.pathname !== "/admin/full-screen-maps"; + }; + const getActiveRoute = (routes) => { + let activeRoute = "Default Brand Text"; + for (let i = 0; i < routes.length; i++) { + if (routes[i].collapse) { + let collapseActiveRoute = getActiveRoute(routes[i].views); + if (collapseActiveRoute !== activeRoute) { + return collapseActiveRoute; + } + } else if (routes[i].category) { + let categoryActiveRoute = getActiveRoute(routes[i].views); + if (categoryActiveRoute !== activeRoute) { + return categoryActiveRoute; + } + } else { + if ( + window.location.href.indexOf(routes[i].layout + routes[i].path) !== -1 + ) { + return routes[i].name; + } + } + } + return activeRoute; + }; + // This changes navbar state(fixed or not) + const getActiveNavbar = (routes) => { + let activeNavbar = false; + for (let i = 0; i < routes.length; i++) { + if (routes[i].category) { + let categoryActiveNavbar = getActiveNavbar(routes[i].views); + if (categoryActiveNavbar !== activeNavbar) { + return categoryActiveNavbar; + } + } else { + if ( + window.location.href.indexOf(routes[i].layout + routes[i].path) !== -1 + ) { + if (routes[i].secondaryNavbar) { + return routes[i].secondaryNavbar; + } + } + } + } + return activeNavbar; + }; + const getRoutes = (routes) => { + return routes.map((prop, key) => { + if (prop.collapse) { + return getRoutes(prop.views); + } + if (prop.category === "account") { + return getRoutes(prop.views); + } + if (prop.layout === "/admin") { + return ( + + ); + } else { + return null; + } + }); + }; + const { isOpen, onOpen, onClose } = useDisclosure(); + document.documentElement.dir = "ltr"; + // Chakra Color Mode + return ( + + + + + {/* */} - - {getRoute() ? ( - - - - {getRoutes(routes)} - - - - - ) : null} - {/*