mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 10:31:13 -05:00
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:
@@ -1,5 +1,5 @@
|
|||||||
import { useState, lazy, Suspense, useEffect } from 'react';
|
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 { Header } from '@/components/layout/Header';
|
||||||
import { getBannerUrls } from '@/lib/cloudflareImageUtils';
|
import { getBannerUrls } from '@/lib/cloudflareImageUtils';
|
||||||
import { trackPageView } from '@/lib/viewTracking';
|
import { trackPageView } from '@/lib/viewTracking';
|
||||||
@@ -435,9 +435,12 @@ export default function ParkDetail() {
|
|||||||
<Users className="w-4 h-4 text-muted-foreground" />
|
<Users className="w-4 h-4 text-muted-foreground" />
|
||||||
<div>
|
<div>
|
||||||
<div className="font-medium">Operator</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}
|
{park.operator.name}
|
||||||
</div>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>}
|
</div>}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user