diff --git a/web/pages/group/[...slugs]/index.tsx b/web/pages/group/[...slugs]/index.tsx
index caa08314..d201842d 100644
--- a/web/pages/group/[...slugs]/index.tsx
+++ b/web/pages/group/[...slugs]/index.tsx
@@ -148,20 +148,11 @@ export default function GroupPage(props: {
const rightSidebar = (
-
-
+
+
{contracts && (
-
Recent Questions
+
Recent Questions
b.createdTime - a.createdTime)
@@ -175,15 +166,24 @@ export default function GroupPage(props: {
)
- const leaderboardsTab = (
-
-
+
+
+
+
+
)
return (
@@ -194,27 +194,24 @@ export default function GroupPage(props: {
url={groupPath(group.slug)}
/>
-
-
+
+
-
- {group.about}
-
+
- {isMember && (
-
+
- )}
- {!isMember && group.anyoneCanJoin && (
-
- )}
+
-
+
+
+
+
-
-
-
-
- {leaderboardsTab}
- >
- ),
+ content: detailsTab,
href: groupPath(group.slug, 'details'),
},
]}
@@ -288,6 +268,24 @@ export default function GroupPage(props: {
)
}
+function JoinOrCreateButton(props: {
+ group: Group
+ user: User | null | undefined
+ isMember: boolean
+}) {
+ const { group, user, isMember } = props
+ return isMember ? (
+
+ ) : group.anyoneCanJoin ? (
+
+ ) : null
+}
+
function GroupOverview(props: {
group: Group
creator: User