From 2891a47d8c0ae66317b8315efb27e2e34453d52e Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Fri, 23 Sep 2022 16:49:14 -0400 Subject: [PATCH] Support navigating to /about pages --- web/pages/group/[...slugs]/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/pages/group/[...slugs]/index.tsx b/web/pages/group/[...slugs]/index.tsx index 0dfe40a0..d768a222 100644 --- a/web/pages/group/[...slugs]/index.tsx +++ b/web/pages/group/[...slugs]/index.tsx @@ -145,6 +145,9 @@ 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 as any + ) const group = useGroup(props.group?.id) ?? props.group const aboutPost = usePost(props.aboutPost?.id) ?? props.aboutPost @@ -277,7 +280,8 @@ export default function GroupPage(props: { />
- + {/* TODO: Switching tabs should also update the group path */} +
)