2020-07-01 03:19:50 +10:00
|
|
|
import { connect } from 'react-redux';
|
2023-05-24 01:15:17 +10:00
|
|
|
|
2020-07-07 09:24:03 +10:00
|
|
|
import { submitAccountNote } from 'mastodon/actions/account_notes';
|
2023-05-24 01:15:17 +10:00
|
|
|
|
2020-07-01 03:19:50 +10:00
|
|
|
import AccountNote from '../components/account_note';
|
|
|
|
|
2020-07-07 09:24:03 +10:00
|
|
|
const mapStateToProps = (state, { account }) => ({
|
|
|
|
value: account.getIn(['relationship', 'note']),
|
|
|
|
});
|
2020-07-01 03:19:50 +10:00
|
|
|
|
|
|
|
const mapDispatchToProps = (dispatch, { account }) => ({
|
|
|
|
|
2020-07-07 09:24:03 +10:00
|
|
|
onSave (value) {
|
2023-09-12 00:09:22 +10:00
|
|
|
dispatch(submitAccountNote({ id: account.get('id'), value}));
|
2020-07-01 03:19:50 +10:00
|
|
|
},
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(AccountNote);
|