Make operator name clickable

Update ParkDetail to wrap park.operator.name in a Link to the operator page, and import Link from react-router-dom. This changes the display from plain text to a navigable link and fixes missing import.
This commit is contained in:
gpt-engineer-app[bot]
2025-11-12 03:36:15 +00:00
parent 9bab4358e3
commit fd4e21734f

View File

@@ -1,5 +1,5 @@
import { useState, lazy, Suspense, useEffect } from 'react';
import { useParams, useNavigate } from 'react-router-dom';
import { useParams, useNavigate, Link } from 'react-router-dom';
import { Header } from '@/components/layout/Header';
import { getBannerUrls } from '@/lib/cloudflareImageUtils';
import { trackPageView } from '@/lib/viewTracking';
@@ -435,9 +435,12 @@ export default function ParkDetail() {
<Users className="w-4 h-4 text-muted-foreground" />
<div>
<div className="font-medium">Operator</div>
<div className="text-sm text-muted-foreground">
<Link
to={`/operators/${park.operator.slug}`}
className="text-sm text-primary hover:underline"
>
{park.operator.name}
</div>
</Link>
</div>
</div>}