From 57ec4a31fc178d8128ce6c1c19460c1b31b9a3c6 Mon Sep 17 00:00:00 2001 From: jasquat Date: Fri, 11 Nov 2022 10:28:08 -0500 Subject: [PATCH] some more task tab play --- spiffworkflow-frontend/package-lock.json | 5 +-- .../src/routes/HomePageRoutes.tsx | 34 +++++++++++-------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/spiffworkflow-frontend/package-lock.json b/spiffworkflow-frontend/package-lock.json index 258b3e58..79b2bbb5 100644 --- a/spiffworkflow-frontend/package-lock.json +++ b/spiffworkflow-frontend/package-lock.json @@ -46545,7 +46545,7 @@ "@csstools/postcss-text-decoration-shorthand": "^1.0.0", "@csstools/postcss-trigonometric-functions": "^1.0.2", "@csstools/postcss-unset-value": "^1.0.2", - "autoprefixer": "10.4.8", + "autoprefixer": "10.4.5", "browserslist": "^4.21.3", "css-blank-pseudo": "^3.0.3", "css-has-pseudo": "^3.0.4", @@ -46583,7 +46583,8 @@ }, "dependencies": { "autoprefixer": { - "version": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.5.tgz", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.5.tgz", "integrity": "sha512-Fvd8yCoA7lNX/OUllvS+aS1I7WRBclGXsepbvT8ZaPgrH24rgXpZzF0/6Hh3ZEkwg+0AES/Osd196VZmYoEFtw==", "requires": { "browserslist": "^4.20.2", diff --git a/spiffworkflow-frontend/src/routes/HomePageRoutes.tsx b/spiffworkflow-frontend/src/routes/HomePageRoutes.tsx index fa0be5fd..261e9035 100644 --- a/spiffworkflow-frontend/src/routes/HomePageRoutes.tsx +++ b/spiffworkflow-frontend/src/routes/HomePageRoutes.tsx @@ -14,30 +14,36 @@ export default function HomePageRoutes() { useEffect(() => { setErrorMessage(null); + let newSelectedTabIndex = 0; + if (location.pathname.match(/^\/tasks\/\d/)) { + newSelectedTabIndex = 1; + } + setSelectedTabIndex(newSelectedTabIndex); }, [location, setErrorMessage]); - // selectedIndex={selectedTabIndex} - // onChange={(event: any) => { - // setSelectedTabIndex(event.selectedIndex); - // }} return ( <> -

HELO

- + { + setSelectedTabIndex(event.selectedIndex); + }} + > - navigate('http://www.google.com')}> - Tab Label 1 + navigate('/tasks/my-tasks')}>My Tasks + + navigate('/tasks/9/4dc9f6e3-2256-47b2-9f78-6bc2f061db80') + } + > + One Task - Tab Label 2 - Tab Label 3 - - Tab Label 4 with a very long long title - - Tab Label 5 +
} /> + } /> } />