From 5435bb1fbdd76614ec077c375a2b30c473d87f85 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Mon, 29 Sep 2025 12:56:34 +0000 Subject: [PATCH] Visual edit in Lovable --- src/components/parks/ParkCard.tsx | 89 ++++++++++++------------------- 1 file changed, 35 insertions(+), 54 deletions(-) diff --git a/src/components/parks/ParkCard.tsx b/src/components/parks/ParkCard.tsx index 7cffe234..b04c4415 100644 --- a/src/components/parks/ParkCard.tsx +++ b/src/components/parks/ParkCard.tsx @@ -3,65 +3,56 @@ import { Card, CardContent } from '@/components/ui/card'; import { Badge } from '@/components/ui/badge'; import { Button } from '@/components/ui/button'; import { Park } from '@/types/database'; - interface ParkCardProps { park: Park; onClick?: () => void; } - -export function ParkCard({ park, onClick }: ParkCardProps) { +export function ParkCard({ + park, + onClick +}: ParkCardProps) { const getStatusColor = (status: string) => { switch (status) { - case 'operating': return 'bg-green-500/20 text-green-400 border-green-500/30'; - case 'seasonal': return 'bg-yellow-500/20 text-yellow-400 border-yellow-500/30'; - case 'under_construction': return 'bg-blue-500/20 text-blue-400 border-blue-500/30'; - default: return 'bg-red-500/20 text-red-400 border-red-500/30'; + case 'operating': + return 'bg-green-500/20 text-green-400 border-green-500/30'; + case 'seasonal': + return 'bg-yellow-500/20 text-yellow-400 border-yellow-500/30'; + case 'under_construction': + return 'bg-blue-500/20 text-blue-400 border-blue-500/30'; + default: + return 'bg-red-500/20 text-red-400 border-red-500/30'; } }; - const getParkTypeIcon = (type: string) => { switch (type) { - case 'theme_park': return ; - case 'amusement_park': return ; - case 'water_park': return ; - case 'family_entertainment': return ; - default: return ; + case 'theme_park': + return; + case 'amusement_park': + return ; + case 'water_park': + return ; + case 'family_entertainment': + return ; + default: + return ; } }; - const formatParkType = (type: string) => { - return type.split('_').map(word => - word.charAt(0).toUpperCase() + word.slice(1) - ).join(' '); + return type.split('_').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' '); }; - - return ( - + return
{/* Image Placeholder with Gradient */}
- {park.card_image_url ? ( - {park.name} - ) : ( -
+ {park.card_image_url ? {park.name} :
{getParkTypeIcon(park.park_type)} -
- )} +
} {/* Gradient Overlay */}
{/* Status Badge */} - + {park.status.replace('_', ' ').toUpperCase()}
@@ -76,20 +67,16 @@ export function ParkCard({ park, onClick }: ParkCardProps) { {getParkTypeIcon(park.park_type)}
- {park.location && ( -
+ {park.location &&
{park.location.city && `${park.location.city}, `}{park.location.country} -
- )} +
}
{/* Description */} - {park.description && ( -

+ {park.description &&

{park.description} -

- )} +

} {/* Park Type */} @@ -109,24 +96,18 @@ export function ParkCard({ park, onClick }: ParkCardProps) { - {park.average_rating > 0 && ( -
+ {park.average_rating > 0 &&
{park.average_rating.toFixed(1)} ({park.review_count}) -
- )} +
} {/* Action Button */} - -
- ); +
; } \ No newline at end of file