From 9152bdbb4a6aef472d4721d578f5432c574717fb Mon Sep 17 00:00:00 2001 From: mheggelund Date: Mon, 2 Oct 2023 15:19:39 +0200 Subject: [PATCH] chore: Cleanup and fixed imports --- .../ModelNavigationBar.styled.tsx | 19 +-------- .../ModelNavigationBar/ModelNavigationBar.tsx | 41 +++++-------------- src/router.tsx | 4 +- 3 files changed, 15 insertions(+), 49 deletions(-) diff --git a/src/features/ModelView/ModelNavigationBar/ModelNavigationBar.styled.tsx b/src/features/ModelView/ModelNavigationBar/ModelNavigationBar.styled.tsx index f12f28a6..896ad4cb 100644 --- a/src/features/ModelView/ModelNavigationBar/ModelNavigationBar.styled.tsx +++ b/src/features/ModelView/ModelNavigationBar/ModelNavigationBar.styled.tsx @@ -23,21 +23,7 @@ export const StyledSidebarLink = styled(SideBar.Link)` } ` -export const StyledAccordian = styled(SideBar.Accordion)` - &.activeTab { - background: none; - > p { - color: ${theme.light.primary.resting}; - font-weight: bold; - } - > svg { - fill: ${theme.light.primary.resting}; - opacity: 1; - } - } -` - -export const StyledAccordianItem = styled(SideBar.AccordionItem)` +export const StyledAccordionItem = styled(SideBar.AccordionItem)` > div { border-left: solid; border-color: ${theme.light.ui.background.medium}; @@ -65,8 +51,7 @@ export const StyledAccordianItem = styled(SideBar.AccordionItem)` ` export { - StyledAccordian as Accordian, - StyledAccordianItem as AccordianItem, + StyledAccordionItem as AccordionItem, StyledSidebarContent as SidebarContent, StyledSidebarLink as SidebarLink, } diff --git a/src/features/ModelView/ModelNavigationBar/ModelNavigationBar.tsx b/src/features/ModelView/ModelNavigationBar/ModelNavigationBar.tsx index 92281e81..be01dcc3 100644 --- a/src/features/ModelView/ModelNavigationBar/ModelNavigationBar.tsx +++ b/src/features/ModelView/ModelNavigationBar/ModelNavigationBar.tsx @@ -22,6 +22,7 @@ type MenuItems = SidebarLinkProps & { export const ModelNavigationBar = () => { const location = useLocation() const tab = location.pathname.split('/') + const path = tab[tab.length - 1] const menuItems: SidebarLinkProps[] = [ { @@ -30,7 +31,6 @@ export const ModelNavigationBar = () => { href: 'details', active: false, }, - { label: 'Results', icon: approve, @@ -62,54 +62,35 @@ export const ModelNavigationBar = () => { return ( - {/* */} - {/* {menuItems.map((m) => ( - - ))} */} - {sidebarCompute.subItems?.map((item) => ( - + > ))} diff --git a/src/router.tsx b/src/router.tsx index e98b4e40..ec6c7dd2 100644 --- a/src/router.tsx +++ b/src/router.tsx @@ -5,8 +5,8 @@ import { About } from './pages/About/About' import { Api } from './pages/Api/Api' import { Browse } from './pages/Browse/Browse' import { InvalidURL } from './pages/InvalidURL/InvalidURL' -import { ComputeObject } from './pages/ModelPages/Compute/ComputeObject' -import { ComputeVariogram } from './pages/ModelPages/Compute/ComputeVariogram' +import { ComputeObject } from './pages/ModelPages/Compute/ComputeObject/ComputeObject' +import { ComputeVariogram } from './pages/ModelPages/Compute/ComputeVariogram/ComputeVariogram' import { Model } from './pages/ModelPages/Model/Model' import { Results } from './pages/ModelPages/Results/Results'