From 28e8ab9067d32f24dfd10f19a4d6bbd9a9edfe9e Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 9 Sep 2020 14:52:27 -0500 Subject: [PATCH] Highlight home tab for public timelines, fixes #406 --- app/soapbox/features/ui/components/tabs_bar.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/soapbox/features/ui/components/tabs_bar.js b/app/soapbox/features/ui/components/tabs_bar.js index e85efa40a..1440e2ae6 100644 --- a/app/soapbox/features/ui/components/tabs_bar.js +++ b/app/soapbox/features/ui/components/tabs_bar.js @@ -46,6 +46,11 @@ class TabsBar extends React.PureComponent { this.node = ref; } + isHomeActive = (match, location) => { + const { pathname } = location; + return pathname === '/' || pathname.startsWith('/timeline/'); + } + getNavLinks() { const { intl: { formatMessage }, logo, account } = this.props; let links = []; @@ -57,7 +62,7 @@ class TabsBar extends React.PureComponent { ); } links.push( - + );