diff --git a/ui/src/components/Resource.tsx b/ui/src/components/Resource.tsx index 9a80cf8..b88edbb 100644 --- a/ui/src/components/Resource.tsx +++ b/ui/src/components/Resource.tsx @@ -2,7 +2,7 @@ import { useParams } from 'react-router-dom'; import { useEffect, useState, useMemo } from 'react'; import { fetchNui } from '../utils/fetchNui'; 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 { TriangleDownIcon, TriangleUpIcon, @@ -12,6 +12,7 @@ import { ChevronRightIcon, } from '@chakra-ui/icons'; import { useTable, useSortBy, Column, usePagination, useFlexLayout } from 'react-table'; +import { debugData } from '../utils/debugData'; interface QueryData { date: number; @@ -99,7 +100,7 @@ const Resource: React.FC = () => { }); return ( - <> + {headerGroups.map((header): any => ( @@ -127,7 +128,7 @@ const Resource: React.FC = () => { ))} - {isLoaded ? ( + {isLoaded && ( <> {page.map((row) => { prepareRow(row); @@ -150,10 +151,12 @@ const Resource: React.FC = () => { ); })} - ) :
} + )}
+ {!isLoaded && } + { /> - +
); };