Navigate to ?tab=portfolio
This commit is contained in:
parent
e2047210b7
commit
419c7ab636
|
@ -20,8 +20,6 @@ import { useIsIframe } from 'web/hooks/use-is-iframe'
|
||||||
import { trackCallback } from 'web/lib/service/analytics'
|
import { trackCallback } from 'web/lib/service/analytics'
|
||||||
import { User } from 'common/user'
|
import { User } from 'common/user'
|
||||||
|
|
||||||
import { PAST_BETS } from 'common/user'
|
|
||||||
|
|
||||||
function getNavigation() {
|
function getNavigation() {
|
||||||
return [
|
return [
|
||||||
{ name: 'Home', href: '/home', icon: HomeIcon },
|
{ name: 'Home', href: '/home', icon: HomeIcon },
|
||||||
|
@ -42,7 +40,7 @@ const signedOutNavigation = [
|
||||||
export const userProfileItem = (user: User) => ({
|
export const userProfileItem = (user: User) => ({
|
||||||
name: formatMoney(user.balance),
|
name: formatMoney(user.balance),
|
||||||
trackingEventName: 'profile',
|
trackingEventName: 'profile',
|
||||||
href: `/${user.username}?tab=${PAST_BETS}`,
|
href: `/${user.username}?tab=portfolio`,
|
||||||
icon: () => (
|
icon: () => (
|
||||||
<Avatar
|
<Avatar
|
||||||
className="mx-auto my-1"
|
className="mx-auto my-1"
|
||||||
|
|
|
@ -4,12 +4,11 @@ import { User } from 'web/lib/firebase/users'
|
||||||
import { formatMoney } from 'common/util/format'
|
import { formatMoney } from 'common/util/format'
|
||||||
import { Avatar } from '../avatar'
|
import { Avatar } from '../avatar'
|
||||||
import { trackCallback } from 'web/lib/service/analytics'
|
import { trackCallback } from 'web/lib/service/analytics'
|
||||||
import { PAST_BETS } from 'common/user'
|
|
||||||
|
|
||||||
export function ProfileSummary(props: { user: User }) {
|
export function ProfileSummary(props: { user: User }) {
|
||||||
const { user } = props
|
const { user } = props
|
||||||
return (
|
return (
|
||||||
<Link href={`/${user.username}?tab=${PAST_BETS}`}>
|
<Link href={`/${user.username}?tab=portfolio`}>
|
||||||
<a
|
<a
|
||||||
onClick={trackCallback('sidebar: profile')}
|
onClick={trackCallback('sidebar: profile')}
|
||||||
className="group mb-3 flex flex-row items-center gap-4 truncate rounded-md py-3 text-gray-500 hover:bg-gray-100 hover:text-gray-700"
|
className="group mb-3 flex flex-row items-center gap-4 truncate rounded-md py-3 text-gray-500 hover:bg-gray-100 hover:text-gray-700"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user