account_note_container.js 489 B

1234567891011121314151617
  1. import { connect } from 'react-redux';
  2. import { submitAccountNote } from 'mastodon/actions/account_notes';
  3. import AccountNote from '../components/account_note';
  4. const mapStateToProps = (state, { account }) => ({
  5. value: account.getIn(['relationship', 'note']),
  6. });
  7. const mapDispatchToProps = (dispatch, { account }) => ({
  8. onSave (value) {
  9. dispatch(submitAccountNote(account.get('id'), value));
  10. },
  11. });
  12. export default connect(mapStateToProps, mapDispatchToProps)(AccountNote);