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 }) {
const { user } = props
return (
<Link href={`/${user.username}`}>
<Link href={`/${user.username}?tab=bets`}>
<a
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"

View File

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