mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 14:11:12 -05:00
Implement strict type enforcement plan
This commit is contained in:
@@ -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>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user