feat: optimize awaitables

This commit is contained in:
tresabhi committed 2024-11-29 13:20:27 -06:00
1 parent 80fca2e53a
commit 74e85f82f1
54 files changed
+259 -190

No files matched your search

@@ -1,6 +1,6 @@
import { fetchTankDefinitions } from '@blitzkit/core';
import { Flex, Table } from '@radix-ui/themes';
import { useEffect, useRef } from 'react';
import { awaitableTankDefinitions } from '../../../core/awaitables/tankDefinitions';
import { TierList } from '../../../stores/tierList';
import { tierListRowElements } from '../Table/constants';
import { TierListTile } from '../Tile';
@@ -10,7 +10,7 @@ interface TierListRowProps {
index: number;
}
const tankDefinitions = await fetchTankDefinitions();
const tankDefinitions = await awaitableTankDefinitions;
export function TierListRow({ index }: TierListRowProps) {
const tanks = TierList.use((state) => state.rows[index].tanks);