diff --git a/client/components/passport/GroupPassport.tsx b/client/components/passport/GroupPassport.tsx new file mode 100644 index 00000000..e4d198c8 --- /dev/null +++ b/client/components/passport/GroupPassport.tsx @@ -0,0 +1,206 @@ +import { Badge } from "@/components/ui/badge"; +import { Button } from "@/components/ui/button"; +import { + Globe, + Github, + Users, + Calendar, + Mail, + MapPin, +} from "lucide-react"; + +interface GroupMember { + userId: string; + role: string; + joinedAt: string; + user: { + id: string; + username: string; + full_name: string; + avatar_url: string | null; + }; +} + +interface Project { + id: string; + title: string; + slug: string; + description: string | null; + image_url: string | null; + created_at: string; +} + +interface GroupPassportProps { + group: { + id: string; + name: string; + description: string | null; + logo_url: string | null; + banner_url: string | null; + website: string | null; + github_url: string | null; + created_at: string; + updated_at: string; + memberCount: number; + members: GroupMember[]; + }; + projects: Project[]; + owner?: { + id: string; + username: string; + full_name: string; + avatar_url: string | null; + }; +} + +export default function GroupPassport({ + group, + projects, + owner, +}: GroupPassportProps) { + const createdDate = new Date(group.created_at).toLocaleDateString("en-US", { + year: "numeric", + month: "long", + day: "numeric", + }); + + return ( +
{group.description}
++ {member.user?.full_name} +
++ @{member.user?.username} +
++ {project.description} +
+ )} ++ {new Date(project.created_at).toLocaleDateString()} +
+