Add follow request banner on account header (#20785)

* Add requested_by to relationship maps

* Display whether an account has requested to follow you on their profile
This commit is contained in:
Claire
2022-12-15 18:50:11 +01:00
committed by GitHub
parent 7a3c6bb888
commit 70415714f1
10 changed files with 127 additions and 4 deletions

View File

@ -0,0 +1,15 @@
import { connect } from 'react-redux';
import FollowRequestNote from '../components/follow_request_note';
import { authorizeFollowRequest, rejectFollowRequest } from 'mastodon/actions/accounts';
const mapDispatchToProps = (dispatch, { account }) => ({
onAuthorize () {
dispatch(authorizeFollowRequest(account.get('id')));
},
onReject () {
dispatch(rejectFollowRequest(account.get('id')));
},
});
export default connect(null, mapDispatchToProps)(FollowRequestNote);