Merge branch 'main' into atlas4
This commit is contained in:
commit
a7df49bde2
|
@ -58,7 +58,14 @@ function getNavigation() {
|
||||||
|
|
||||||
function getMoreNavigation(user?: User | null) {
|
function getMoreNavigation(user?: User | null) {
|
||||||
if (IS_PRIVATE_MANIFOLD) {
|
if (IS_PRIVATE_MANIFOLD) {
|
||||||
return [{ name: 'Leaderboards', href: '/leaderboards' }]
|
return [
|
||||||
|
{ name: 'Leaderboards', href: '/leaderboards' },
|
||||||
|
{
|
||||||
|
name: 'Sign out',
|
||||||
|
href: '#',
|
||||||
|
onClick: logout,
|
||||||
|
},
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!user) {
|
if (!user) {
|
||||||
|
|
|
@ -14,7 +14,7 @@ export const PortfolioValueSection = memo(
|
||||||
}) {
|
}) {
|
||||||
const { disableSelector, userId } = props
|
const { disableSelector, userId } = props
|
||||||
|
|
||||||
const [portfolioPeriod, setPortfolioPeriod] = useState<Period>('allTime')
|
const [portfolioPeriod, setPortfolioPeriod] = useState<Period>('weekly')
|
||||||
const [portfolioHistory, setUsersPortfolioHistory] = useState<
|
const [portfolioHistory, setUsersPortfolioHistory] = useState<
|
||||||
PortfolioMetrics[]
|
PortfolioMetrics[]
|
||||||
>([])
|
>([])
|
||||||
|
@ -53,13 +53,15 @@ export const PortfolioValueSection = memo(
|
||||||
{!disableSelector && (
|
{!disableSelector && (
|
||||||
<select
|
<select
|
||||||
className="select select-bordered self-start"
|
className="select select-bordered self-start"
|
||||||
|
value={portfolioPeriod}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
setPortfolioPeriod(e.target.value as Period)
|
setPortfolioPeriod(e.target.value as Period)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<option value="allTime">{allTimeLabel}</option>
|
<option value="allTime">{allTimeLabel}</option>
|
||||||
<option value="weekly">7 days</option>
|
<option value="weekly">Last 7d</option>
|
||||||
<option value="daily">24 hours</option>
|
{/* Note: 'daily' seems to be broken? */}
|
||||||
|
{/* <option value="daily">Last 24h</option> */}
|
||||||
</select>
|
</select>
|
||||||
)}
|
)}
|
||||||
</Row>
|
</Row>
|
||||||
|
|
|
@ -29,6 +29,7 @@ import { formatMoney } from 'common/util/format'
|
||||||
import { ShareIconButton } from 'web/components/share-icon-button'
|
import { ShareIconButton } from 'web/components/share-icon-button'
|
||||||
import { ENV_CONFIG } from 'common/envs/constants'
|
import { ENV_CONFIG } from 'common/envs/constants'
|
||||||
import { BettingStreakModal } from 'web/components/profile/betting-streak-modal'
|
import { BettingStreakModal } from 'web/components/profile/betting-streak-modal'
|
||||||
|
import { REFERRAL_AMOUNT } from 'common/user'
|
||||||
|
|
||||||
export function UserLink(props: {
|
export function UserLink(props: {
|
||||||
name: string
|
name: string
|
||||||
|
@ -226,7 +227,7 @@ export function UserPage(props: { user: User }) {
|
||||||
)}
|
)}
|
||||||
</Row>
|
</Row>
|
||||||
<Spacer h={5} />
|
<Spacer h={5} />
|
||||||
{currentUser?.id === user.id && (
|
{currentUser?.id === user.id && REFERRAL_AMOUNT > 0 && (
|
||||||
<Row
|
<Row
|
||||||
className={
|
className={
|
||||||
'w-full items-center justify-center gap-2 rounded-md border-2 border-indigo-100 bg-indigo-50 p-2 text-indigo-600'
|
'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>
|
<span>
|
||||||
<SiteLink href="/referrals">
|
<SiteLink href="/referrals">
|
||||||
Earn {formatMoney(500)} when you refer a friend!
|
Earn {formatMoney(REFERRAL_AMOUNT)} when you refer a friend!
|
||||||
</SiteLink>{' '}
|
</SiteLink>{' '}
|
||||||
You have <ReferralsButton user={user} currentUser={currentUser} />
|
You have <ReferralsButton user={user} currentUser={currentUser} />
|
||||||
</span>
|
</span>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user