diff --git a/web/app/routes/logbook.flights.$id/route.tsx b/web/app/routes/logbook.flights.$id/route.tsx
index eef6ca6..1adfb7d 100644
--- a/web/app/routes/logbook.flights.$id/route.tsx
+++ b/web/app/routes/logbook.flights.$id/route.tsx
@@ -1,5 +1,5 @@
import { client } from "@/util/api";
-import { List, Stack, Text } from "@mantine/core";
+import { Center, Container, List, Loader, Stack, Text } from "@mantine/core";
import { useParams } from "@remix-run/react";
import { useQuery } from "@tanstack/react-query";
@@ -13,27 +13,31 @@ export default function Flight() {
});
return (
-
- {flight.isError ? (
- Error fetching flight
- ) : flight.isPending ? (
- Loading...
- ) : (
-
- {Object.entries(flight.data).map(([key, value]) =>
- value && value.length !== 0 ? (
-
-
-
- {key}
+
+
+ {flight.isError ? (
+ Error fetching flight
+ ) : flight.isPending ? (
+
+
+
+ ) : (
+
+ {Object.entries(flight.data).map(([key, value]) =>
+ value && value.length !== 0 ? (
+
+
+
+ {key}
+
+ : {value}
- : {value}
-
-
- ) : null
- )}
-
- )}
-
+
+ ) : null
+ )}
+
+ )}
+
+
);
}
diff --git a/web/app/routes/logbook.flights/flights-list.tsx b/web/app/routes/logbook.flights/flights-list.tsx
index 4c688b0..b1ace34 100644
--- a/web/app/routes/logbook.flights/flights-list.tsx
+++ b/web/app/routes/logbook.flights/flights-list.tsx
@@ -1,6 +1,15 @@
import { client } from "@/util/api";
import { FlightConciseSchema } from "@/util/types";
-import { NavLink, Text, Button, ScrollArea, Stack } from "@mantine/core";
+import {
+ NavLink,
+ Text,
+ Button,
+ ScrollArea,
+ Stack,
+ Loader,
+ Center,
+ Container,
+} from "@mantine/core";
import { Link, useLocation, useNavigate } from "@remix-run/react";
import { IconPlus } from "@tabler/icons-react";
import { useQuery } from "@tanstack/react-query";
@@ -26,7 +35,7 @@ export function FlightsList() {
>
Add
-
+
{flights.data ? (
flights.data.map((flight: FlightConciseSchema, index: number) => (
))
+ ) : flights.isLoading ? (
+
+
+
) : (
No Flights
)}
@@ -69,6 +82,10 @@ export function MobileFlightsList() {
active={page === flight.id}
/>
))
+ ) : flights.isLoading ? (
+
+
+
) : (
No Flights
)}