Allow admins to see bets page

This commit is contained in:
James Grugett 2022-09-04 00:03:04 -05:00
parent 3b390f758f
commit 1e2593894c

View File

@ -39,6 +39,7 @@ import { PortfolioValueSection } from './portfolio/portfolio-value-section'
import { filterDefined } from 'common/util/array' import { filterDefined } from 'common/util/array'
import { useUserBets } from 'web/hooks/use-user-bets' import { useUserBets } from 'web/hooks/use-user-bets'
import { ReferralsButton } from 'web/components/referrals-button' import { ReferralsButton } from 'web/components/referrals-button'
import { ENV_CONFIG } from 'common/envs/constants'
export function UserLink(props: { export function UserLink(props: {
name: string name: string
@ -288,7 +289,11 @@ export function UserPage(props: { user: User; currentUser?: User }) {
</span> </span>
), ),
}, },
...(isCurrentUser ...(isCurrentUser ||
[
...(ENV_CONFIG.whitelistCreators ?? []),
'JamesGrugett',
].includes(currentUser?.username ?? '')
? [ ? [
{ {
title: 'Bets', title: 'Bets',