fix: tanks with fixed camos no longer have the camo buttons in compare

This commit is contained in:
tresabhi committed 2024-12-14 14:43:04 -06:00
1 parent 03ec44c765
commit 9e4bdcd458
1 file changed
+18 -16
@@ -544,23 +544,25 @@ export function CompareTable({ stats }: CompareTableProps) {
</Popover.Root> </Popover.Root>
</Flex> </Flex>
<IconButton {!tank.fixed_camouflage && (
onClick={() => { <IconButton
mutateCompareEphemeral((draft) => { onClick={() => {
draft.members[index].camouflage = !camouflage; mutateCompareEphemeral((draft) => {
}); draft.members[index].camouflage = !camouflage;
}} });
variant={camouflage ? 'solid' : 'outline'}
>
<img
src={asset('icons/camo.webp')}
style={{
width: '1em',
height: '1em',
transform: 'scale(2) translate(15%, 15%)',
}} }}
/> variant={camouflage ? 'solid' : 'outline'}
</IconButton> >
<img
src={asset('icons/camo.webp')}
style={{
width: '1em',
height: '1em',
transform: 'scale(2) translate(15%, 15%)',
}}
/>
</IconButton>
)}
</Flex> </Flex>
</Table.Cell> </Table.Cell>
); );