From d64259bb18dbf481248185d4a58c431f263fd4d8 Mon Sep 17 00:00:00 2001 From: Logan Date: Sun, 21 Jun 2026 10:14:52 -0400 Subject: [PATCH] Fix auth --- drb-frontend/app/trips/[id]/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drb-frontend/app/trips/[id]/page.tsx b/drb-frontend/app/trips/[id]/page.tsx index 6cd179b..5f7ef6f 100644 --- a/drb-frontend/app/trips/[id]/page.tsx +++ b/drb-frontend/app/trips/[id]/page.tsx @@ -710,7 +710,7 @@ type FullTrip = TripRecord & { events: TripEvent[] }; export default function TripDetailPage() { const { id } = useParams<{ id: string }>(); const router = useRouter(); - const { isAdmin } = useAuth(); + const { isAdmin, user } = useAuth(); const [trip, setTrip] = useState(null); const [loading, setLoading] = useState(true); @@ -732,7 +732,7 @@ export default function TripDetailPage() { } }, [id, selectedDay]); - useEffect(() => { load(); }, [id]); + useEffect(() => { if (user) load(); }, [id, user]); // Fetch drive times for a given day useEffect(() => {