removed tabs from taskshow page w/ burnettk cullerton

This commit is contained in:
jasquat 2022-11-18 17:10:34 -05:00
parent 6d782278e5
commit 9c08e70d6a
1 changed files with 24 additions and 13 deletions

View File

@ -28,6 +28,10 @@ export default function HomePageRoutes() {
setSelectedTabIndex(newSelectedTabIndex); setSelectedTabIndex(newSelectedTabIndex);
}, [location, setErrorMessage]); }, [location, setErrorMessage]);
const renderTabs = () => {
if (location.pathname.match(/^\/tasks\/\d+\/\b/)) {
return null;
}
return ( return (
<> <>
<Tabs selectedIndex={selectedTabIndex}> <Tabs selectedIndex={selectedTabIndex}>
@ -43,6 +47,13 @@ export default function HomePageRoutes() {
</TabList> </TabList>
</Tabs> </Tabs>
<br /> <br />
</>
);
};
return (
<>
{renderTabs()}
<Routes> <Routes>
<Route path="/" element={<MyTasks />} /> <Route path="/" element={<MyTasks />} />
<Route path="my-tasks" element={<MyTasks />} /> <Route path="my-tasks" element={<MyTasks />} />