From 3633167d8aeb0f58d3bb12db8683d5317fd98ebb Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Tue, 1 Mar 2022 17:19:20 -0800 Subject: [PATCH] Hide "Add Funds" and "Personalize your feed" --- web/components/profile-menu.tsx | 14 ++++++++++---- web/pages/home.tsx | 4 +++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/web/components/profile-menu.tsx b/web/components/profile-menu.tsx index 7cc00e6a..919a2031 100644 --- a/web/components/profile-menu.tsx +++ b/web/components/profile-menu.tsx @@ -3,6 +3,7 @@ import { formatMoney } from '../../common/util/format' import { Avatar } from './avatar' import { Col } from './layout/col' import { MenuButton } from './menu' +import { IS_PRIVATE_MANIFOLD } from '../lib/firebase/init' export function ProfileMenu(props: { user: User | undefined }) { const { user } = props @@ -54,10 +55,15 @@ function getNavigationOptions( name: 'Your trades', href: '/trades', }, - { - name: 'Add funds', - href: '/add-funds', - }, + // Disable "Add Funds" for teams + ...(IS_PRIVATE_MANIFOLD + ? [] + : [ + { + name: 'Add funds', + href: '/add-funds', + }, + ]), { name: 'Leaderboards', href: '/leaderboards', diff --git a/web/pages/home.tsx b/web/pages/home.tsx index 664489e6..6a7ceccb 100644 --- a/web/pages/home.tsx +++ b/web/pages/home.tsx @@ -26,6 +26,7 @@ import { import { useGetRecentBets } from '../hooks/use-bets' import { usePropz } from '../hooks/use-propz' import { useActiveContracts } from '../hooks/use-contracts' +import { IS_PRIVATE_MANIFOLD } from '../lib/firebase/init' export async function getStaticPropz() { const contractInfo = await getAllContractInfo() @@ -82,7 +83,8 @@ const Home = (props: { {initialFollowedFoldSlugs !== undefined && - initialFollowedFoldSlugs.length === 0 && ( + initialFollowedFoldSlugs.length === 0 && + !IS_PRIVATE_MANIFOLD && (