diff --git a/src/ui/common/Tabs.tsx b/src/ui/common/Tabs.tsx index 5f4250f8eec8386159bad711ec86edaabf6aec66..e850d5ef4c06fcba22b2c447a093dedc37d48469 100644 --- a/src/ui/common/Tabs.tsx +++ b/src/ui/common/Tabs.tsx @@ -7,9 +7,7 @@ import * as React from 'react'; import {translate} from 'react-i18next'; import {connect} from 'react-redux'; import { Link } from 'react-router-dom'; -import {bindActionCreators} from 'redux'; -import { navigateTo } from 'actions/navigation'; import MuiTabs from '@material-ui/core/Tabs'; import MuiTab from '@material-ui/core/Tab'; import {withStyles} from '@material-ui/core/styles'; @@ -62,6 +60,9 @@ const styles = (theme) => ({ }, tabsArea: { alignSelf: 'flex-end' as 'flex-end', + '& a': { + color: 'black', + } } }); /*tslint:enable*/ @@ -83,7 +84,7 @@ class Tab extends React.Component { class Tabs extends React.Component { public render() { - const { tab, children, navigateTo, actions, classes, t } = this.props; + const { tab, children, actions, classes, t } = this.props; const tabs = (children as Tab[]).map((ch) => { return { @@ -97,15 +98,20 @@ class Tabs extends React.Component { return t.name === tab; }) || 0; - const tabChange = (e, index) => { - navigateTo(tabs[index].to); - }; - return ( - - { tabs.map((tab) => ) } + + { tabs.map((tab) => { + return ( + + ); + }) } @@ -121,10 +127,6 @@ const mapStateToProps = (state, ownProps) => ({ foo: ownProps, }); -const mapDispatchToProps = (dispatch) => bindActionCreators({ - navigateTo, -}, dispatch); - -const tabs = translate()(connect(mapStateToProps, mapDispatchToProps)(withStyles(styles)(Tabs))); +const tabs = translate()(connect(mapStateToProps, null)(withStyles(styles)(Tabs))); export { tabs as default, Tab };