diff --git a/src/components/designers/DesignerCard.tsx b/src/components/designers/DesignerCard.tsx new file mode 100644 index 00000000..00861711 --- /dev/null +++ b/src/components/designers/DesignerCard.tsx @@ -0,0 +1,127 @@ +import { Card, CardContent } from '@/components/ui/card'; +import { Badge } from '@/components/ui/badge'; +import { Star, MapPin, Ruler, FerrisWheel } from 'lucide-react'; +import { Company } from '@/types/database'; +import { useNavigate } from 'react-router-dom'; + +interface DesignerCardProps { + company: Company; +} + +export function DesignerCard({ company }: DesignerCardProps) { + const navigate = useNavigate(); + + const handleClick = () => { + navigate(`/designers/${company.slug}/`); + }; + + const getCompanyIcon = () => { + return ; + }; + + return ( + + {/* Header Image/Logo Section */} +
+ {/* Background Gradient Overlay */} +
+ + {/* Company Type Badge */} +
+ + Designer + +
+ + {/* Logo or Icon */} +
+ {company.logo_url ? ( + {`${company.name} + ) : ( +
+ {getCompanyIcon()} +
+ )} +
+
+ + + {/* Company Name */} +
+

+ {company.name} +

+ + {/* Description */} + {company.description && ( +

+ {company.description} +

+ )} +
+ + {/* Company Details */} +
+ {/* Founded Year */} + {company.founded_year && ( +
+ Founded: + {company.founded_year} +
+ )} + + {/* Location */} + {company.headquarters_location && ( +
+ + {company.headquarters_location} +
+ )} + + {/* Rating */} + {company.average_rating > 0 && ( +
+ + {company.average_rating.toFixed(1)} + ({company.review_count} reviews) +
+ )} +
+ + {/* Stats Display */} +
+ {(company as any).ride_count > 0 && ( +
+ + {(company as any).ride_count} + designs +
+ )} + + {(company as any).coaster_count > 0 && ( +
+ + {(company as any).coaster_count} + coasters +
+ )} + + {(company as any).model_count > 0 && ( +
+ + {(company as any).model_count} + concepts +
+ )} +
+
+ + ); +} \ No newline at end of file diff --git a/src/pages/Designers.tsx b/src/pages/Designers.tsx index d93c3c51..bef2de76 100644 --- a/src/pages/Designers.tsx +++ b/src/pages/Designers.tsx @@ -6,7 +6,7 @@ import { Badge } from '@/components/ui/badge'; import { Search, SlidersHorizontal, Palette } from 'lucide-react'; import { Company } from '@/types/database'; import { supabase } from '@/integrations/supabase/client'; -import { ManufacturerCard } from '@/components/manufacturers/ManufacturerCard'; +import { DesignerCard } from '@/components/designers/DesignerCard'; export default function Designers() { const [companies, setCompanies] = useState([]); @@ -119,7 +119,7 @@ export default function Designers() { {filteredCompanies.length > 0 ? (
{filteredCompanies.map((company) => ( - + ))}
) : (