some more task tab play
This commit is contained in:
parent
ae68c937ce
commit
a19a9b3c13
|
@ -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",
|
||||
|
|
|
@ -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 (
|
||||
<>
|
||||
<h1>HELO</h1>
|
||||
<Tabs>
|
||||
<Tabs
|
||||
selectedIndex={selectedTabIndex}
|
||||
onChange={(event: any) => {
|
||||
setSelectedTabIndex(event.selectedIndex);
|
||||
}}
|
||||
>
|
||||
<TabList aria-label="List of tabs">
|
||||
<Tab onClick={() => navigate('http://www.google.com')}>
|
||||
Tab Label 1
|
||||
<Tab onClick={() => navigate('/tasks/my-tasks')}>My Tasks</Tab>
|
||||
<Tab
|
||||
onClick={() =>
|
||||
navigate('/tasks/9/4dc9f6e3-2256-47b2-9f78-6bc2f061db80')
|
||||
}
|
||||
>
|
||||
One Task
|
||||
</Tab>
|
||||
<Tab>Tab Label 2</Tab>
|
||||
<Tab disabled>Tab Label 3</Tab>
|
||||
<Tab title="Tab Label 4 with a very long long title">
|
||||
Tab Label 4 with a very long long title
|
||||
</Tab>
|
||||
<Tab>Tab Label 5</Tab>
|
||||
</TabList>
|
||||
</Tabs>
|
||||
<br />
|
||||
<Routes>
|
||||
<Route path="/" element={<MyTasks />} />
|
||||
<Route path="/my-tasks" element={<MyTasks />} />
|
||||
<Route path=":process_instance_id/:task_id" element={<TaskShow />} />
|
||||
</Routes>
|
||||
</>
|
||||
|
|
Loading…
Reference in New Issue