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

@@ -3,11 +3,11 @@ import { useNavigate } from 'react-router-dom';
import { Card, CardContent } from '@/components/ui/card';
import { Badge } from '@/components/ui/badge';
import { Building, Star, MapPin } from 'lucide-react';
import { Company } from '@/types/database';
import { CompanyWithStats } from '@/types/database';
import { getCloudflareImageUrl } from '@/lib/cloudflareImageUtils';
interface OperatorCardProps {
company: Company;
company: CompanyWithStats;
}
const OperatorCard = ({ company }: OperatorCardProps) => {
@@ -53,10 +53,10 @@ const OperatorCard = ({ company }: OperatorCardProps) => {
{/* Logo Display */}
<div className="absolute inset-0 flex items-center justify-center">
{(company.logo_url || (company as any).logo_image_id) ? (
{company.logo_url ? (
<div className="w-20 h-20 bg-background/90 rounded-xl overflow-hidden shadow-lg backdrop-blur-sm border border-border/50">
<img
src={company.logo_url || getCloudflareImageUrl((company as any).logo_image_id, 'logo')}
src={company.logo_url}
alt={`${company.name} logo`}
className="w-full h-full object-contain p-2"
loading="lazy"
@@ -108,10 +108,10 @@ const OperatorCard = ({ company }: OperatorCardProps) => {
{/* Park Count Stats */}
<div className="flex flex-wrap gap-x-4 gap-y-1 text-sm">
{(company as any).park_count > 0 && (
{company.park_count && company.park_count > 0 && (
<div className="flex items-center gap-1">
<Building className="w-3 h-3 text-muted-foreground" />
<span className="font-medium">{(company as any).park_count}</span>
<span className="font-medium">{company.park_count}</span>
<span className="text-muted-foreground">parks operated</span>
</div>
)}