fix block community functionality in sidebar (#1316)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
This commit is contained in:
parent
414c930929
commit
afcffce572
3 changed files with 25 additions and 43 deletions
|
@ -647,6 +647,12 @@ export class Community extends Component<
|
|||
const blockCommunityRes = await HttpService.client.blockCommunity(form);
|
||||
if (blockCommunityRes.state == "success") {
|
||||
updateCommunityBlock(blockCommunityRes.data);
|
||||
this.setState(s => {
|
||||
if (s.communityRes.state == "success") {
|
||||
s.communityRes.data.community_view.blocked =
|
||||
blockCommunityRes.data.blocked;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue