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 5 additions and 3 deletions

View File

@ -118,7 +118,7 @@ class Followers extends ImmutablePureComponent {
} }
return ( return (
<Column label={intl.formatMessage(messages.heading)} withHeader={false} transparent> <Column label={intl.formatMessage(messages.heading)}>
<ScrollableList <ScrollableList
scrollKey='followers' scrollKey='followers'
hasMore={hasMore} hasMore={hasMore}

View File

@ -118,7 +118,7 @@ class Following extends ImmutablePureComponent {
} }
return ( return (
<Column label={intl.formatMessage(messages.heading)} withHeader={false} transparent> <Column label={intl.formatMessage(messages.heading)}>
<ScrollableList <ScrollableList
scrollKey='following' scrollKey='following'
hasMore={hasMore} hasMore={hasMore}

View File

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