-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MWB-888: move source and target tabs to separate file
- Loading branch information
1 parent
f699d56
commit 00baf79
Showing
5 changed files
with
60 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
mapping_workbench/frontend/src/sections/app/source-and-target/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import Tab from '@mui/material/Tab'; | ||
import Tabs from '@mui/material/Tabs'; | ||
import {useRouter} from 'next/router'; | ||
import {paths} from '../../../paths'; | ||
|
||
export const SourceAndTargetTabs = () => { | ||
const router = useRouter() | ||
|
||
const TABS = [ | ||
{ | ||
label: 'Source Files', | ||
value: paths.app.test_data_suites.index | ||
}, { | ||
label: 'Ontology Files', | ||
value: paths.app.ontology_files.index | ||
}, | ||
{ | ||
label: 'Ontology Terms', | ||
value: paths.app.ontology_terms.index | ||
}, { | ||
label: 'Namespaces', | ||
value: paths.app.ontology_namespaces.index | ||
}] | ||
|
||
const handleTabsChange = (event, value) => { | ||
return router.push(value) | ||
} | ||
|
||
console.log(router) | ||
|
||
return <Tabs value={router.pathname} | ||
onChange={handleTabsChange}> | ||
{TABS.map(tab => <Tab key={tab.value} | ||
label={tab.label} | ||
value={tab.value}/>)} | ||
</Tabs> | ||
} |