Minor tweaks for custom instances

This commit is contained in:
Austin Chen 2022-08-21 22:13:42 -07:00
parent 258b2a318f
commit 3158740ea3
2 changed files with 11 additions and 3 deletions

View File

@ -58,7 +58,14 @@ function getNavigation() {
function getMoreNavigation(user?: User | null) {
if (IS_PRIVATE_MANIFOLD) {
return [{ name: 'Leaderboards', href: '/leaderboards' }]
return [
{ name: 'Leaderboards', href: '/leaderboards' },
{
name: 'Sign out',
href: '#',
onClick: logout,
},
]
}
if (!user) {

View File

@ -29,6 +29,7 @@ import { formatMoney } from 'common/util/format'
import { ShareIconButton } from 'web/components/share-icon-button'
import { ENV_CONFIG } from 'common/envs/constants'
import { BettingStreakModal } from 'web/components/profile/betting-streak-modal'
import { REFERRAL_AMOUNT } from 'common/user'
export function UserLink(props: {
name: string
@ -226,7 +227,7 @@ export function UserPage(props: { user: User }) {
)}
</Row>
<Spacer h={5} />
{currentUser?.id === user.id && (
{currentUser?.id === user.id && REFERRAL_AMOUNT > 0 && (
<Row
className={
'w-full items-center justify-center gap-2 rounded-md border-2 border-indigo-100 bg-indigo-50 p-2 text-indigo-600'
@ -234,7 +235,7 @@ export function UserPage(props: { user: User }) {
>
<span>
<SiteLink href="/referrals">
Earn {formatMoney(500)} when you refer a friend!
Earn {formatMoney(REFERRAL_AMOUNT)} when you refer a friend!
</SiteLink>{' '}
You have <ReferralsButton user={user} currentUser={currentUser} />
</span>