import PropTypes from 'prop-types'; import React from 'react'; import InlineSVG from 'react-inlinesvg'; import { FormattedMessage, defineMessages, useIntl } from 'react-intl'; import { useDispatch } from 'react-redux'; import { Link, withRouter } from 'react-router-dom'; import { changeSettingImmediate } from 'soapbox/actions/settings'; import snackbar from 'soapbox/actions/snackbar'; import { Text } from 'soapbox/components/ui'; import Column from '../ui/components/column'; const messages = defineMessages({ heading: { id: 'column.developers', defaultMessage: 'Developers' }, leave: { id: 'developers.leave', defaultMessage: 'You have left developers' }, }); const Developers = ({ history }) => { const intl = useIntl(); const dispatch = useDispatch(); const leaveDevelopers = (e) => { e.preventDefault(); dispatch(changeSettingImmediate(['isDeveloper'], false)); dispatch(snackbar.success(intl.formatMessage(messages.leave))); history.push('/'); }; return (
); }; Developers.propTypes = { history: PropTypes.object, }; export default withRouter(Developers);