Updates to account, ui, etc

This commit is contained in:
2025-05-13 22:57:29 -04:00
parent a273d4134b
commit abfa6b534c
38 changed files with 781 additions and 215 deletions

View File

@@ -13,11 +13,11 @@ export function AirportTable() {
useEffect(() => {
const limit = 1000;
getAirports({ page, limit }).then(r => {
getAirports({ page, limit }).then((r) => {
setData(r.data);
setTotalPages(r.total / r.data.length);
});
},[page]);
}, [page]);
const rows = data.map((row, idx) => (
<Table.Tr key={idx}>
@@ -43,14 +43,8 @@ export function AirportTable() {
<Table.Tbody>{rows}</Table.Tbody>
</Table>
</ScrollArea>
<Center mt="sm">
<Pagination
value={page}
onChange={setPage}
total={totalPages}
siblings={1}
boundaries={1}
/>
<Center mt='sm'>
<Pagination value={page} onChange={setPage} total={totalPages} siblings={1} boundaries={1} />
</Center>
</>
);