Remove portfolio link; user icon links to portfolio

This commit is contained in:
Austin Chen 2022-06-28 11:03:14 -05:00
parent 0b585d1c98
commit 2f434c849d
2 changed files with 3 additions and 11 deletions

View File

@ -8,7 +8,7 @@ import { trackCallback } from 'web/lib/service/analytics'
export function ProfileSummary(props: { user: User }) { export function ProfileSummary(props: { user: User }) {
const { user } = props const { user } = props
return ( return (
<Link href={`/${user.username}`}> <Link href={`/${user.username}?tab=bets`}>
<a <a
onClick={trackCallback('sidebar: profile')} onClick={trackCallback('sidebar: profile')}
className="group flex flex-row items-center gap-4 rounded-md py-3 text-gray-500 hover:bg-gray-100 hover:text-gray-700" className="group flex flex-row items-center gap-4 rounded-md py-3 text-gray-500 hover:bg-gray-100 hover:text-gray-700"

View File

@ -5,7 +5,6 @@ import {
DotsHorizontalIcon, DotsHorizontalIcon,
CashIcon, CashIcon,
HeartIcon, HeartIcon,
PresentationChartLineIcon,
UserGroupIcon, UserGroupIcon,
ChevronDownIcon, ChevronDownIcon,
TrendingUpIcon, TrendingUpIcon,
@ -27,14 +26,9 @@ import { groupPath } from 'web/lib/firebase/groups'
import { trackCallback, withTracking } from 'web/lib/service/analytics' import { trackCallback, withTracking } from 'web/lib/service/analytics'
import { Group } from 'common/group' import { Group } from 'common/group'
function getNavigation(username: string) { function getNavigation() {
return [ return [
{ name: 'Home', href: '/home', icon: HomeIcon }, { name: 'Home', href: '/home', icon: HomeIcon },
{
name: 'Portfolio',
href: `/${username}?tab=bets`,
icon: PresentationChartLineIcon,
},
{ {
name: 'Notifications', name: 'Notifications',
href: `/notifications`, href: `/notifications`,
@ -177,9 +171,7 @@ export default function Sidebar(props: { className?: string }) {
const currentPage = router.pathname const currentPage = router.pathname
const user = useUser() const user = useUser()
const navigationOptions = !user const navigationOptions = !user ? signedOutNavigation : getNavigation()
? signedOutNavigation
: getNavigation(user?.username || 'error')
const mobileNavigationOptions = !user const mobileNavigationOptions = !user
? signedOutMobileNavigation ? signedOutMobileNavigation
: signedInMobileNavigation : signedInMobileNavigation