feat: state passing

This commit is contained in:
TrèsAbhi committed 2024-10-27 22:38:14 -05:00
1 parent a0d6aecf7a
commit fa489a665a
2 files changed
+28 -3

No files matched your search

@@ -30,5 +30,13 @@ export function BreakdownPreview() {
export function BreakdownRenderer() {
const { useState } = useEmbedStateCurry<typeof breakdownConfig>();
return useState('cardBodyBackgroundColor');
return (
<BreakdownEmbedWrapper>
{useState('showTotal') && <BreakdownEmbedCard tank={null} />}
{tanks.slice(0, useState('listMaxTanks')).map((tank) => (
<BreakdownEmbedCard key={tank.id} tank={tank} />
))}
</BreakdownEmbedWrapper>
);
}