Implement strict type enforcement plan

This commit is contained in:
gpt-engineer-app[bot]
2025-10-16 14:10:35 +00:00
parent 3bcd9e03fa
commit bc4a444138
25 changed files with 161 additions and 132 deletions

View File

@@ -1,12 +1,12 @@
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 { CompanyWithStats } from '@/types/database';
import { useNavigate } from 'react-router-dom';
import { getCloudflareImageUrl } from '@/lib/cloudflareImageUtils';
interface DesignerCardProps {
company: Company;
company: CompanyWithStats;
}
export function DesignerCard({ company }: DesignerCardProps) {
@@ -39,9 +39,9 @@ export function DesignerCard({ company }: DesignerCardProps) {
{/* Logo or Icon */}
<div className="relative z-10 flex items-center justify-center">
{(company.logo_url || (company as any).logo_image_id) ? (
{company.logo_url ? (
<img
src={company.logo_url || getCloudflareImageUrl((company as any).logo_image_id, 'logo')}
src={company.logo_url}
alt={`${company.name} logo`}
className="max-w-20 max-h-20 object-contain filter drop-shadow-sm"
loading="lazy"
@@ -92,26 +92,26 @@ export function DesignerCard({ company }: DesignerCardProps) {
{/* Stats Display */}
<div className="flex flex-wrap gap-x-4 gap-y-1 text-sm">
{(company as any).ride_count > 0 && (
{company.ride_count && company.ride_count > 0 && (
<div className="flex items-center gap-1">
<FerrisWheel className="w-3 h-3 text-muted-foreground" />
<span className="font-medium">{(company as any).ride_count}</span>
<span className="font-medium">{company.ride_count}</span>
<span className="text-muted-foreground">designs</span>
</div>
)}
{(company as any).coaster_count > 0 && (
{company.coaster_count && company.coaster_count > 0 && (
<div className="flex items-center gap-1">
<span className="text-muted-foreground"></span>
<span className="font-medium">{(company as any).coaster_count}</span>
<span className="font-medium">{company.coaster_count}</span>
<span className="text-muted-foreground">coasters</span>
</div>
)}
{(company as any).model_count > 0 && (
{company.model_count && company.model_count > 0 && (
<div className="flex items-center gap-1">
<span className="text-muted-foreground"></span>
<span className="font-medium">{(company as any).model_count}</span>
<span className="font-medium">{company.model_count}</span>
<span className="text-muted-foreground">concepts</span>
</div>
)}