mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 22:51:13 -05:00
Refactor Park Address Display
This commit is contained in:
@@ -337,11 +337,59 @@ export default function ParkDetail() {
|
||||
|
||||
<div className="space-y-4">
|
||||
<div className="font-medium">Location</div>
|
||||
{park.location && <div className="text-sm text-muted-foreground space-y-1">
|
||||
{park.location.city && <div>{park.location.city}</div>}
|
||||
{park.location.state_province && <div>{park.location.state_province}</div>}
|
||||
<div>{park.location.country}</div>
|
||||
</div>}
|
||||
{park.location && (
|
||||
<div className="space-y-3">
|
||||
{/* Full Address Display */}
|
||||
<div className="text-sm text-muted-foreground">
|
||||
<div className="font-medium text-foreground mb-1">Address:</div>
|
||||
<div className="space-y-1">
|
||||
{park.location.name && <div>{park.location.name}</div>}
|
||||
{park.location.city && <div>{park.location.city}</div>}
|
||||
{park.location.state_province && <div>{park.location.state_province}</div>}
|
||||
{park.location.postal_code && <div>{park.location.postal_code}</div>}
|
||||
<div>{park.location.country}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Map Links */}
|
||||
{park.location?.latitude && park.location?.longitude && (
|
||||
<div className="flex gap-2 flex-wrap">
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
asChild
|
||||
className="text-xs"
|
||||
>
|
||||
<a
|
||||
href={`https://maps.apple.com/?q=${encodeURIComponent(park.name)}&ll=${park.location.latitude},${park.location.longitude}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="flex items-center gap-1"
|
||||
>
|
||||
<MapPin className="w-3 h-3" />
|
||||
Apple Maps
|
||||
</a>
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
asChild
|
||||
className="text-xs"
|
||||
>
|
||||
<a
|
||||
href={`https://maps.google.com/?q=${encodeURIComponent(park.name)}&ll=${park.location.latitude},${park.location.longitude}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="flex items-center gap-1"
|
||||
>
|
||||
<Globe className="w-3 h-3" />
|
||||
Google Maps
|
||||
</a>
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{park.location?.latitude && park.location?.longitude && (
|
||||
<div className="mt-4">
|
||||
|
||||
Reference in New Issue
Block a user