at the end of the day, it was inevitable

This commit is contained in:
Mo Elzubeir
2022-12-09 08:36:26 -06:00
commit 1218570914
1768 changed files with 887087 additions and 0 deletions
@@ -0,0 +1,35 @@
import React from 'react'
import PropTypes from 'prop-types'
import { translate } from 'react-i18next'
import { Button } from 'reactstrap'
export class TableSwitcherItem extends React.PureComponent {
static propTypes = {
table: PropTypes.string.isRequired,
tableVisible: PropTypes.string.isRequired,
onClick: PropTypes.func.isRequired,
t: PropTypes.func.isRequired
};
onClick = () => {
const { onClick, table } = this.props
onClick(table)
};
render () {
const { t, table, tableVisible } = this.props
return (
<Button
outline
color="info"
onClick={this.onClick}
active={tableVisible === table}
>
{t(`tableSwitcher.${table}`)}
</Button>
)
}
}
export default translate(['tabsContent'], { wait: true })(TableSwitcherItem)