Restructure routes, scroll selected flight into view on reload

This commit is contained in:
april
2024-01-18 13:40:51 -06:00
parent b0f90c3959
commit 6a0b455edb
14 changed files with 82 additions and 9 deletions

View File

@@ -0,0 +1,24 @@
import { Divider, Grid, Container, ScrollArea } from "@mantine/core";
import { Outlet } from "@remix-run/react";
import { FlightsList } from "./flights-list";
export default function FlightsLayout() {
return (
<>
<Grid h="100%" visibleFrom="lg">
<Grid.Col span={4}>
<FlightsList />
</Grid.Col>
<Divider orientation="vertical" m="sm" />
<Grid.Col span="auto">
<ScrollArea.Autosize mah="calc(100vh - 95px)">
<Outlet />
</ScrollArea.Autosize>
</Grid.Col>
</Grid>
<Container hiddenFrom="lg" style={{ paddingLeft: 0, paddingRight: 0 }}>
<Outlet />
</Container>
</>
);
}