diff --git a/web/components/nav/group-nav-bar.tsx b/web/components/nav/group-nav-bar.tsx index 9ea3f5a4..7d7a1a8e 100644 --- a/web/components/nav/group-nav-bar.tsx +++ b/web/components/nav/group-nav-bar.tsx @@ -6,15 +6,29 @@ import { trackCallback } from 'web/lib/service/analytics' import TrophyIcon from 'web/lib/icons/trophy-icon' import { useUser } from 'web/hooks/use-user' import NotificationsIcon from '../notifications-icon' -import router from 'next/router' import { userProfileItem } from './bottom-nav-bar' +import Link from 'next/link' -const mobileGroupNavigation = [ - { name: 'Markets', key: 'markets', icon: HomeIcon }, - { name: 'Leaderboard', key: 'leaderboards', icon: TrophyIcon }, - { name: 'About', key: 'about', icon: ClipboardIcon }, +const mobileGroupNavigation = (slug: string) => [ + { + name: 'Markets', + key: 'markets', + icon: HomeIcon, + href: `/group/${slug}/markets`, + }, + { + name: 'About', + key: 'about', + icon: ClipboardIcon, + href: `/group/${slug}/about`, + }, + { + name: 'Leaderboard', + key: 'leaderboards', + icon: TrophyIcon, + href: `/group/${slug}/leaderboards`, + }, ] - const mobileGeneralNavigation = [ { name: 'Notifications', @@ -24,42 +38,24 @@ const mobileGeneralNavigation = [ }, ] -export function GroupNavBar(props: { - currentPage: string - onClick: (key: string) => void -}) { - const { currentPage } = props +export function GroupNavBar(props: { currentPage: string; groupSlug: string }) { + const { currentPage, groupSlug } = props const user = useUser() return (