Group flight list by date

This commit is contained in:
april
2024-01-05 11:13:21 -06:00
parent 7fa749a5de
commit 05fefd40b1
8 changed files with 379 additions and 294 deletions

View File

@@ -8,7 +8,13 @@ import {
IconUser,
} from "@tabler/icons-react";
export default function Navbar() {
export default function Navbar({
opened,
toggle,
}: {
opened: boolean;
toggle: () => void;
}) {
const location = useLocation();
const page = location.pathname.split("/")[2];
@@ -24,6 +30,7 @@ export default function Navbar() {
label="Dashboard"
leftSection={<IconPlaneDeparture />}
active={page == null}
onClick={() => (opened ? toggle() : null)}
/>
<NavLink
p="md"
@@ -32,6 +39,7 @@ export default function Navbar() {
label="Flights"
leftSection={<IconBook2 />}
active={page === "flights"}
onClick={() => (opened ? toggle() : null)}
/>
</Stack>
<Stack gap="0">