]> Untitled Git - lemmy-ui.git/blobdiff - src/shared/components/community/community.tsx
Merge branch 'main' into route-data-refactor
[lemmy-ui.git] / src / shared / components / community / community.tsx
index 6b4eecff64bc19082b232e2571d7ae31eb2713bd..6f3c9112f782231e9af853b199414b2174541a10 100644 (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;
+        }
+      });
     }
   }