fix: some linting for new proto 5

This commit is contained in:
TrèsAbhi committed 2024-10-05 23:20:04 -05:00
1 parent 53a9c5f2de
commit 96310a9d63
40 files changed
+409 -367

No files matched your search

@@ -0,0 +1,28 @@
import { compositeStatsKeys, fetchTankDefinitions } from '@blitzkit/core';
import strings from '@blitzkit/core/lang/en-US.json';
import { breakdownConfig } from '../../constants/embeds';
import { useEmbedStateCurry } from '../../stores/embedState/utilities';
import { BreakdownEmbedCard, BreakdownEmbedWrapper } from '../TanksEmbed';
export const compositeStatsKeysOptions = compositeStatsKeys.map((value) => ({
label: strings.common.composite_stats[value],
value,
}));
const tanks = await fetchTankDefinitions().then((tanks) =>
Object.values(tanks.tanks),
);
export function BreakdownPreview() {
const { useState } = useEmbedStateCurry<typeof breakdownConfig>();
return (
<BreakdownEmbedWrapper>
{useState('showTotal') && <BreakdownEmbedCard tank={null} />}
{tanks.slice(0, useState('listMaxTanks')).map((tank) => (
<BreakdownEmbedCard key={tank.id} tank={tank} />
))}
</BreakdownEmbedWrapper>
);
}