import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage, injectIntl } from 'react-intl'; import { Link } from 'react-router-dom'; import { invitesEnabled } from 'gabsocial/initial_state'; import { connect } from 'react-redux'; import { openModal } from '../../../actions/modal'; import { logOut } from 'gabsocial/actions/auth'; // FIXME: Let this be configured const sourceCode = { name: 'soapbox-fe', url: 'https://gitlab.com/soapbox-pub/soapbox-fe', repository: 'soapox-pub/soapbox-fe', version: '0.0.0', } const mapStateToProps = state => { const me = state.get('me'); return { account: state.getIn(['accounts', me]), } }; const mapDispatchToProps = (dispatch) => ({ onOpenHotkeys() { dispatch(openModal('HOTKEYS')); }, onClickLogOut(e) { dispatch(logOut()); e.preventDefault(); }, }); const LinkFooter = ({ onOpenHotkeys, account, onClickLogOut }) => (
); LinkFooter.propTypes = { withHotkeys: PropTypes.bool, }; export default injectIntl(connect(mapStateToProps, mapDispatchToProps)(LinkFooter));