X-Git-Url: http://these/git/?a=blobdiff_plain;f=src%2Fshared%2Fcomponents%2Fcommunity%2Fcommunity.tsx;h=b88d6f6100e03843ef387ad60a3c8d524a0b1650;hb=53c3cfeade90150b07431386745a24aa699a25ec;hp=3e7615a97b7fd8582d4f1000ff55fc00a67316cc;hpb=2c85c87e4494210f55522653deb8e552b84cbc23;p=lemmy-ui.git diff --git a/src/shared/components/community/community.tsx b/src/shared/components/community/community.tsx index 3e7615a..b88d6f6 100644 --- a/src/shared/components/community/community.tsx +++ b/src/shared/components/community/community.tsx @@ -15,7 +15,6 @@ import { updateCommunityBlock, updatePersonBlock, } from "@utils/app"; -import { isBrowser } from "@utils/browser"; import { getPageFromString, getQueryParams, @@ -23,7 +22,7 @@ import { } from "@utils/helpers"; import type { QueryParams } from "@utils/types"; import { RouteDataResponse } from "@utils/types"; -import { Component, linkEvent } from "inferno"; +import { Component, RefObject, createRef, linkEvent } from "inferno"; import { RouteComponentProps } from "inferno-router/dist/Route"; import { AddAdmin, @@ -155,7 +154,7 @@ export class Community extends Component< finished: new Map(), isIsomorphic: false, }; - + private readonly mainContentRef: RefObject; constructor(props: RouteComponentProps<{ name: string }>, context: any) { super(props, context); @@ -196,9 +195,9 @@ export class Community extends Component< this.handleSavePost = this.handleSavePost.bind(this); this.handlePurgePost = this.handlePurgePost.bind(this); this.handleFeaturePost = this.handleFeaturePost.bind(this); - + this.mainContentRef = createRef(); // Only fetch the data if coming from another route - if (!isBrowser() || FirstLoadService.isFirstLoad) { + if (FirstLoadService.isFirstLoad) { const { communityRes, commentsRes, postsRes } = this.isoData.routeData; this.state = { @@ -313,12 +312,16 @@ export class Community extends Component<
-
+
{this.communityInfo(res)}
-
+
+
+
); @@ -483,7 +486,7 @@ export class Community extends Component< community && (
-
{community.title}
+

{community.title}