import { Link } from 'react-router-dom'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'; import { Users, GraduationCap, ChevronRight, Link2 } from 'lucide-react'; import { useCrew } from '@/hooks/useCrews'; import { useLabProfile } from '@/hooks/useLabProfiles'; import { parseAddrCoord } from '@/lib/types'; const LAB_TYPE_LABEL: Record = { 35001: 'Coach', 35002: 'Filmer', 35003: 'Editor', 35004: 'Photographer', 35005: 'Builder', }; /** A single linked-crew row, resolved from a `35006:pubkey:d` coordinate. */ function CrewRow({ coord }: { coord: string }) { const parsed = parseAddrCoord(coord); const { data: crew } = useCrew(parsed?.identifier ?? '', parsed?.pubkey); if (!parsed) return null; return (
{crew?.image ? ( {crew.name} ) : ( )}

{crew?.name ?? 'Skate Crew'}

Crew{crew?.location ? ` · ${crew.location}` : ''}

); } /** A single linked-Lab-profile row, resolved from a `kind:pubkey:d` coordinate. */ function LabRow({ coord }: { coord: string }) { const parsed = parseAddrCoord(coord); const { data: profile } = useLabProfile(parsed?.identifier ?? '', parsed?.pubkey); if (!parsed) return null; const typeLabel = LAB_TYPE_LABEL[parsed.kind] ?? 'Lab'; return (
{profile?.image ? ( {profile.title} ) : ( )}

{profile?.title ?? `${typeLabel} profile`}

In The Lab · {typeLabel}

); } /** Card shown on a Lab profile: the crew it belongs to. */ export function LinkedCrewCard({ crewRef }: { crewRef?: string }) { if (!crewRef) return null; return ( Part of a Crew ); } /** Card shown on a crew: the Lab service profiles it links to. */ export function LinkedLabCard({ labRefs }: { labRefs: string[] }) { if (!labRefs || labRefs.length === 0) return null; return ( Hire This Crew

Services this crew offers in The Lab

{labRefs.map((coord) => ( ))}
); }