mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-03 06:28:53 +00:00
fix(nui): Properly space all main content elements
This commit is contained in:
1 parent
103ae6deeb
commit
cee8da3dab
1 file changed
+8
-5
@@ -2,7 +2,7 @@ import { useParams } from 'react-router-dom';
|
|||||||
import { useEffect, useState, useMemo } from 'react';
|
import { useEffect, useState, useMemo } from 'react';
|
||||||
import { fetchNui } from '../utils/fetchNui';
|
import { fetchNui } from '../utils/fetchNui';
|
||||||
import { useNuiEvent } from '../hooks/useNuiEvent';
|
import { useNuiEvent } from '../hooks/useNuiEvent';
|
||||||
import { Table, Thead, Tbody, Tr, Th, Td, chakra, Flex, IconButton, Text, Spinner, Center } from '@chakra-ui/react';
|
import { Table, Thead, Tbody, Tr, Th, Td, chakra, Flex, IconButton, Text, Spinner } from '@chakra-ui/react';
|
||||||
import {
|
import {
|
||||||
TriangleDownIcon,
|
TriangleDownIcon,
|
||||||
TriangleUpIcon,
|
TriangleUpIcon,
|
||||||
@@ -12,6 +12,7 @@ import {
|
|||||||
ChevronRightIcon,
|
ChevronRightIcon,
|
||||||
} from '@chakra-ui/icons';
|
} from '@chakra-ui/icons';
|
||||||
import { useTable, useSortBy, Column, usePagination, useFlexLayout } from 'react-table';
|
import { useTable, useSortBy, Column, usePagination, useFlexLayout } from 'react-table';
|
||||||
|
import { debugData } from '../utils/debugData';
|
||||||
|
|
||||||
interface QueryData {
|
interface QueryData {
|
||||||
date: number;
|
date: number;
|
||||||
@@ -99,7 +100,7 @@ const Resource: React.FC = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<Flex direction="column" justifyContent="space-between" alignItems="center" h="100%">
|
||||||
<Table {...getTableProps()} size="sm">
|
<Table {...getTableProps()} size="sm">
|
||||||
<Thead>
|
<Thead>
|
||||||
{headerGroups.map((header): any => (
|
{headerGroups.map((header): any => (
|
||||||
@@ -127,7 +128,7 @@ const Resource: React.FC = () => {
|
|||||||
))}
|
))}
|
||||||
</Thead>
|
</Thead>
|
||||||
<Tbody {...getTableBodyProps()}>
|
<Tbody {...getTableBodyProps()}>
|
||||||
{isLoaded ? (
|
{isLoaded && (
|
||||||
<>
|
<>
|
||||||
{page.map((row) => {
|
{page.map((row) => {
|
||||||
prepareRow(row);
|
prepareRow(row);
|
||||||
@@ -150,10 +151,12 @@ const Resource: React.FC = () => {
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</>
|
</>
|
||||||
) : <Center height={32}><Spinner /></Center>}
|
)}
|
||||||
</Tbody>
|
</Tbody>
|
||||||
</Table>
|
</Table>
|
||||||
|
|
||||||
|
{!isLoaded && <Spinner />}
|
||||||
|
|
||||||
<Flex mt={3} justifyContent="center " alignItems="center" p="1.2vh">
|
<Flex mt={3} justifyContent="center " alignItems="center" p="1.2vh">
|
||||||
<Flex>
|
<Flex>
|
||||||
<IconButton
|
<IconButton
|
||||||
@@ -193,7 +196,7 @@ const Resource: React.FC = () => {
|
|||||||
/>
|
/>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
</>
|
</Flex>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user