From 9d44190b9a4c03032b870e1da9813a90641d3c58 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Tue, 11 Oct 2022 16:04:40 -0500 Subject: [PATCH] Fix group url nav to correct tabs --- web/pages/group/[...slugs]/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/pages/group/[...slugs]/index.tsx b/web/pages/group/[...slugs]/index.tsx index 88c05f78..918b8225 100644 --- a/web/pages/group/[...slugs]/index.tsx +++ b/web/pages/group/[...slugs]/index.tsx @@ -99,10 +99,10 @@ export async function getStaticPaths() { const groupSubpages = [ undefined, GROUP_CHAT_SLUG, + 'overview', 'markets', 'leaderboards', 'about', - 'posts', ] as const export default function GroupPage(props: { @@ -131,8 +131,8 @@ export default function GroupPage(props: { const router = useRouter() const { slugs } = router.query as { slugs: string[] } const page = slugs?.[1] as typeof groupSubpages[number] - const tabIndex = ['markets', 'leaderboard', 'about', 'posts'].indexOf( - page ?? 'markets' + const tabIndex = ['overview', 'markets', 'leaderboards'].indexOf( + page === 'about' ? 'overview' : page ?? 'markets' ) const group = useGroup(props.group?.id) ?? props.group