Skip to content

Commit

Permalink
remove activity on follower profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
ashland3000 committed Apr 17, 2024
1 parent 5c973fb commit 98fc114
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/pages/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const Profile = () => {
const [pageNumber, setPageNumber] = useState<number>(0);
const [portfolio, setPortfolio] = useState<UserPortfolio>()
const route = useRoute()
const isFollowerProfile = (route.params as ProfileRouteParams)?.user !== undefined;
const user = (route.params as ProfileRouteParams)?.user || session!.user!;

const OnActivitySelected = () => {
Expand Down Expand Up @@ -69,7 +70,9 @@ const Profile = () => {

<View className='flex flex-row'>
<SubTabButton title='Portfolio' selected={pageNumber == 0} onPress={OnPortfolioSelected} />
<SubTabButton title='Activity' selected={pageNumber == 1} onPress={OnActivitySelected} />
{!isFollowerProfile && (
<SubTabButton title='Activity' selected={pageNumber == 1} onPress={OnActivitySelected} />
)}
</View>

<ScrollView
Expand Down

0 comments on commit 98fc114

Please sign in to comment.