From e9a539997b15585dfdda0b16339717e8699352eb Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Mon, 7 Jul 2025 16:31:30 +0200 Subject: [PATCH] "Rework" navigation to be less javascript-y --- src/components/JobCard.tsx | 49 ++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/src/components/JobCard.tsx b/src/components/JobCard.tsx index c0b5945..a27c71b 100644 --- a/src/components/JobCard.tsx +++ b/src/components/JobCard.tsx @@ -1,5 +1,4 @@ - -import { useNavigate } from 'react-router-dom'; +import { Link } from 'react-router-dom'; import { Card, CardContent, CardHeader } from '@/components/ui/card'; import { IndJob } from '@/lib/types'; import JobCardHeader from './JobCardHeader'; @@ -23,12 +22,6 @@ const JobCard: React.FC = ({ onImportBOM, isTracked = false }) => { - const navigate = useNavigate(); - - const handleCardClick = () => { - navigate(`/${job.id}`); - }; - const getStatusBackgroundColor = (status: string) => { switch (status) { case 'Planned': return 'bg-gray-600/20'; @@ -43,25 +36,29 @@ const JobCard: React.FC = ({ }; return ( - - - - - - -
- - - + + + + + + +
+ + + + ); };