Updates to account, ui, etc
This commit is contained in:
@@ -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>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user