import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { withTranslation } from 'react-i18next'; const ThreeStrandedButton = (props) => { const { t } = props; const [btnActive, setBtnActive] = useState('view'); function threeStrandedButtonClickedHandler(viewType) { if (props.onThreeStrandedButtonClicked != null) { props.onThreeStrandedButtonClicked(viewType); } setBtnActive(viewType); } return (
); }; ThreeStrandedButton.propTypes = { t: PropTypes.func.isRequired, // i18next onThreeStrandedButtonClicked: PropTypes.func, }; export default withTranslation()(ThreeStrandedButton);