diff --git a/web/app/routes/logbook/flights/flights-list.tsx b/web/app/routes/logbook/flights/flights-list.tsx
index 507dd5f..3d3ba66 100644
--- a/web/app/routes/logbook/flights/flights-list.tsx
+++ b/web/app/routes/logbook/flights/flights-list.tsx
@@ -32,14 +32,12 @@ import { useEffect, useRef, useState } from "react";
function FlightsListDisplay({
flights,
- page,
}: {
flights: UseQueryResult<{
[year: string]: {
[month: string]: { [day: string]: FlightConciseSchema[] };
};
}>;
- page: string;
}) {
const monthNames = [
"January",
@@ -180,7 +178,7 @@ function FlightsListDisplay({
) : null
}
- active={page === flight.id}
+ active={params.id === flight.id}
/>
>
@@ -287,9 +285,6 @@ export function FlightsList() {
}
export function MobileFlightsList() {
- const location = useLocation();
- const page = location.pathname.split("/")[3];
-
const [aircraft, setAircraft] = useState("");
const client = useApi();
@@ -313,7 +308,7 @@ export function MobileFlightsList() {
return (
-
+
{" "}