import { useTranslate } from 'i18n-calypso'; import { connect } from 'react-redux'; import actions from '../state/actions'; import Gridicon from './gridicons'; import ShortcutsPopover from './shortcuts-popover'; export const ListHeader = ( { isFirst, title, viewSettings } ) => { const translate = useTranslate(); return (
  • { title } { isFirst && ( <> { if ( e.key === 'Enter' ) { viewSettings(); } } } aria-label={ translate( 'Open notification settings' ) } role="button" tabIndex="0" > ) }
  • ); }; const mapDispatchToProps = { viewSettings: actions.ui.viewSettings, }; export default connect( null, mapDispatchToProps )( ListHeader );