Merge branch 'main' into route-data-refactor

This commit is contained in:
abias 2023-06-16 18:17:17 -04:00
commit 4d716e039b
25 changed files with 194 additions and 201 deletions

View file

@ -375,7 +375,6 @@ export class Community extends Component<
community_view={res.community_view}
moderators={res.moderators}
admins={site_res.admins}
online={res.online}
enableNsfw={enableNsfw(site_res)}
editable
allLanguages={site_res.all_languages}
@ -662,6 +661,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;
}
});
}
}