fix(nui): Data fetching into manual pagination

Perhaps don't need the loading state...?
This commit is contained in:
Luke committed 2022-01-04 22:04:13 +01:00
1 parent 7560099231
commit 238d7cd589
4 files changed
+60 -50

No files matched your search

+1 -12
View File
@@ -6,17 +6,6 @@ import { debugData } from '../../utils/debugData';
import type { InitData } from '../../types';
const LeftBar: React.FC = () => {
debugData([
{
action: 'init',
data: {
resources: ['ox_inventory', 'luke_garages', 'es_extended'],
totalQueries: 732,
totalTime: 258,
},
},
]);
const [initData, setInitData] = useState<InitData>({ resources: [''], totalQueries: 0, totalTime: 0 });
useNuiEvent<InitData>('openUI', (data) => {
@@ -24,7 +13,7 @@ const LeftBar: React.FC = () => {
});
return (
<Box p="1.2vh" fontSize="1.5vh" float="left" w="13%" height="55vh" overflowY="scroll">
<Box p="1.2vh" fontSize="1.5vh" float="left" w="13%" height="90%" overflowY="scroll">
<VStack align="left">
{initData.resources.map((resource, index) => (
<Link to={resource} key={`${resource}-${index}`}>