Hide tabs on Followers, Following… pages

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2022-07-13 20:54:43 +02:00
parent ffe14d9aa7
commit 54ad8f7fbb
3 changed files with 3 additions and 1 deletions

View file

@ -116,6 +116,8 @@ const ProfilePage: React.FC<IProfilePage> = ({ params, children }) => {
activeItem = 'profile';
}
const showTabs = !['following', 'followers', 'pins'].some(path => pathname.includes(path));
return (
<>
<Layout.Main>
@ -128,7 +130,7 @@ const ProfilePage: React.FC<IProfilePage> = ({ params, children }) => {
{Component => <Component username={username} account={account} />}
</BundleContainer>
{account && (
{account && showTabs && (
<Tabs items={tabItems} activeItem={activeItem} />
)}