X-Git-Url: http://these/git/?a=blobdiff_plain;f=src%2Fshared%2Fcomponents%2Fhome%2Fhome.tsx;h=39753c48e698ee53f4729d827297815fa352edbe;hb=02ffa85b589ea630b259f6c2617b399e05972716;hp=54378f340fc4552f1dbd517c2bde9a8cdc01d7dd;hpb=f8fd90cc2edc77af4dc6d463da8adb499a77b971;p=lemmy-ui.git diff --git a/src/shared/components/home/home.tsx b/src/shared/components/home/home.tsx index 54378f3..39753c4 100644 --- a/src/shared/components/home/home.tsx +++ b/src/shared/components/home/home.tsx @@ -443,16 +443,17 @@ export class Home extends Component { admins={admins} counts={counts} showLocal={showLocal(this.isoData)} + isMobile={true} /> )} {showTrendingMobile && ( -
-
{this.trendingCommunities(true)}
+
+ {this.trendingCommunities()}
)} {showSubscribedMobile && ( -
-
{this.subscribedCommunities}
+
+ {this.subscribedCommunities(true)}
)}
@@ -471,19 +472,7 @@ export class Home extends Component { return (
-
- {this.trendingCommunities()} - {canCreateCommunity(this.state.siteRes) && ( - - )} - -
+ {this.trendingCommunities()}
{ showLocal={showLocal(this.isoData)} /> {this.hasFollows && ( -
-
{this.subscribedCommunities}
-
+
+
+ {this.subscribedCommunities(false)} +
+
)}
); } - trendingCommunities(isMobile = false) { + trendingCommunities() { switch (this.state.trendingCommunitiesRes?.state) { case "loading": return ( @@ -514,68 +505,103 @@ export class Home extends Component { case "success": { const trending = this.state.trendingCommunitiesRes.data.communities; return ( -
-
- - # - + <> +
+
+ # - - -
-
    - {trending.map(cv => ( -
  • - -
  • - ))} -
-
+ + # + + + + +
+ {trending.length > 0 && ( +
    + {trending.map(cv => ( +
  • + +
  • + ))} +
+ )} + {canCreateCommunity(this.state.siteRes) && ( + + )} + +
+ ); } } } - get subscribedCommunities() { + subscribedCommunities(isMobile = false) { const { subscribedCollapsed } = this.state; return ( -
-
- - # - + <> +
+
+ # - - - -
- {!subscribedCollapsed && ( -
    - {UserService.Instance.myUserInfo?.follows.map(cfv => ( -
  • - -
  • - ))} -
- )} -
+ + # + + + + {!isMobile && ( + + )} + +
+
+
    + {UserService.Instance.myUserInfo?.follows.map(cfv => ( +
  • + +
  • + ))} +
+
+
+ ); }