diff --git a/web/components/referrals-button.tsx b/web/components/referrals-button.tsx index 74fc113d..fed8fb6b 100644 --- a/web/components/referrals-button.tsx +++ b/web/components/referrals-button.tsx @@ -5,13 +5,13 @@ import { prefetchUsers, useUserById } from 'web/hooks/use-user' import { Col } from './layout/col' import { Modal } from './layout/modal' import { Tabs } from './layout/tabs' -import { TextButton } from './text-button' import { Row } from 'web/components/layout/row' import { Avatar } from 'web/components/avatar' import { UserLink } from 'web/components/user-page' import { useReferrals } from 'web/hooks/use-referrals' import { FilterSelectUsers } from 'web/components/filter-select-users' import { getUser, updateUser } from 'web/lib/firebase/users' +import { TextButton } from 'web/components/text-button' export function ReferralsButton(props: { user: User; currentUser?: User }) { const { user, currentUser } = props @@ -24,7 +24,6 @@ export function ReferralsButton(props: { user: User; currentUser?: User }) { {referralIds?.length ?? ''}{' '} Referrals - {children} - + ) } diff --git a/web/components/user-page.tsx b/web/components/user-page.tsx index fc89a285..035536b5 100644 --- a/web/components/user-page.tsx +++ b/web/components/user-page.tsx @@ -8,9 +8,9 @@ import Confetti from 'react-confetti' import { follow, + getPortfolioHistory, unfollow, User, - getPortfolioHistory, } from 'web/lib/firebase/users' import { CreatorContractsList } from './contract/contracts-list' import { SEO } from './SEO' @@ -40,6 +40,8 @@ import { filterDefined } from 'common/util/array' import { useUserBets } from 'web/hooks/use-user-bets' import { ReferralsButton } from 'web/components/referrals-button' import { formatMoney } from 'common/util/format' +import { ShareIconButton } from 'web/components/share-icon-button' +import { ENV_CONFIG } from 'common/envs/constants' export function UserLink(props: { name: string @@ -212,9 +214,6 @@ export function UserPage(props: { user: User; currentUser?: User }) { - {currentUser?.username === 'ian' && ( - - )} @@ -269,7 +268,26 @@ export function UserPage(props: { user: User; currentUser?: User }) { )} - + + {currentUser?.id === user.id && ( + + + Refer a friend and earn {formatMoney(500)} when they sign up! You + have + + + + )} + {usersContracts !== 'loading' && contractsById && usersComments ? (