import { localize } from 'i18n-calypso'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import actions from '../state/actions'; import Gridicon from './gridicons'; const routeBack = ( global, unselectNote ) => ( event ) => { event.stopPropagation(); event.preventDefault(); global.input.lastInputWasKeyboard = false; unselectNote(); }; export const BackButton = ( { global, isEnabled, translate, unselectNote } ) => { const backText = translate( 'Back', { context: 'go back (like the back button in a browser)', } ); return isEnabled ? ( ) : ( ); }; BackButton.propTypes = { isEnabled: PropTypes.bool.isRequired, }; const mapDispatchToProps = { unselectNote: actions.ui.unselectNote, }; export default connect( null, mapDispatchToProps )( localize( BackButton ) );