import { Button } from "@/components/ui/button" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { Plus, Users } from "lucide-react" import Link from "next/link" import { getApiUrl } from "@/lib/api-config" async function getGroups() { try { const res = await fetch(`${getApiUrl()}/groups/`, { cache: 'no-store' }) if (!res.ok) return [] return res.json() } catch (e) { console.error(e) return [] } } export default async function GroupsPage() { const groups = await getGroups() return (

Communities

Join a group to connect with other fans.

{groups.length > 0 ? ( groups.map((group: any) => ( {group.name} {group.privacy === 'private' && ( Private )}

{group.description || "No description"}

{group.member_count || 0} members
)) ) : (
No groups found. Be the first to create one!
)}
) }