From a1b5332910f61ade69ecaabd4e3f5fc5d06f8c1c Mon Sep 17 00:00:00 2001 From: april Date: Thu, 11 Jan 2024 17:10:44 -0600 Subject: [PATCH] Prettify category/class fields --- web/app/routes/logbook.dashboard/route.tsx | 45 +++++++++++++++------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/web/app/routes/logbook.dashboard/route.tsx b/web/app/routes/logbook.dashboard/route.tsx index 6cefbee..96f0591 100644 --- a/web/app/routes/logbook.dashboard/route.tsx +++ b/web/app/routes/logbook.dashboard/route.tsx @@ -2,7 +2,15 @@ import CollapsibleFieldset from "@/ui/display/collapsible-fieldset"; import { VerticalLogItem } from "@/ui/display/log-item"; import ErrorDisplay from "@/ui/error-display"; import { useApi } from "@/util/api"; -import { Center, Group, Loader, Container, Stack, Title } from "@mantine/core"; +import { + Center, + Text, + Group, + Loader, + Container, + Stack, + Title, +} from "@mantine/core"; import { randomId } from "@mantine/hooks"; import { useQuery } from "@tanstack/react-query"; import { useEffect, useState } from "react"; @@ -69,19 +77,6 @@ export default function Dashboard() { /> - - - {totalsData?.by_class?.map((total: object[]) => ( - <> - - - ))} - - + + + {totalsData?.by_class?.map((category) => ( + + + {category.aircraft_category} + + + {category.classes.map((total) => ( + <> + + + ))} + + + ))} + + )}