2020-06-30 20:19:50 +03:00
|
|
|
import { connect } from 'react-redux';
|
2020-07-07 02:24:03 +03:00
|
|
|
import { submitAccountNote } from 'mastodon/actions/account_notes';
|
2020-06-30 20:19:50 +03:00
|
|
|
import AccountNote from '../components/account_note';
|
|
|
|
|
2020-07-07 02:24:03 +03:00
|
|
|
const mapStateToProps = (state, { account }) => ({
|
|
|
|
value: account.getIn(['relationship', 'note']),
|
|
|
|
});
|
2020-06-30 20:19:50 +03:00
|
|
|
|
|
|
|
const mapDispatchToProps = (dispatch, { account }) => ({
|
|
|
|
|
2020-07-07 02:24:03 +03:00
|
|
|
onSave (value) {
|
|
|
|
dispatch(submitAccountNote(account.get('id'), value));
|
2020-06-30 20:19:50 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(AccountNote);
|