From cf5c8a1c07a73581eb11aeaf7829460863ce2b5b Mon Sep 17 00:00:00 2001 From: Jay Sitter Date: Sat, 17 Jun 2023 15:24:55 -0400 Subject: [PATCH] fix(a11y): Fix some mobile styles for Sidebar Cards --- src/shared/components/home/home.tsx | 53 +++++++++++---------- src/shared/components/home/site-sidebar.tsx | 45 +++++++++-------- 2 files changed, 52 insertions(+), 46 deletions(-) diff --git a/src/shared/components/home/home.tsx b/src/shared/components/home/home.tsx index 851c5c25..23b09414 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)}
)} {showSubscribedMobile && ( -
-
{this.subscribedCommunities}
+
+ {this.subscribedCommunities(true)}
)}
@@ -497,7 +498,7 @@ export class Home extends Component { id="sidebarSubscribed" className="card border-secondary mb-3" > - {this.subscribedCommunities} + {this.subscribedCommunities(false)}
)} @@ -541,7 +542,7 @@ export class Home extends Component { } } - get subscribedCommunities() { + subscribedCommunities(isMobile = false) { const { subscribedCollapsed } = this.state; return ( @@ -558,26 +559,28 @@ export class Home extends Component { - + {!isMobile && ( + + )}
{ return ( <>
{this.props.site.name}
- + {!this.props.isMobile && ( + + )} ); }