diff --git a/web/pages/group/[...slugs]/index.tsx b/web/pages/group/[...slugs]/index.tsx index d6c8d38c..b5a28299 100644 --- a/web/pages/group/[...slugs]/index.tsx +++ b/web/pages/group/[...slugs]/index.tsx @@ -448,6 +448,7 @@ function GroupLeaderboard(props: { function GroupPosts(props: { posts: Post[]; group: Group }) { const { posts, group } = props const [showCreatePost, setShowCreatePost] = useState(false) + const user = useUser() const createPost = @@ -458,12 +459,14 @@ function GroupPosts(props: { posts: Post[]; group: Group }) { </Col> <Col> - <Button - className="btn-md" - onClick={() => setShowCreatePost(!showCreatePost)} - > - Add a Post - </Button> + {user && ( + <Button + className="btn-md" + onClick={() => setShowCreatePost(!showCreatePost)} + > + Add a Post + </Button> + )} </Col> </Row>