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>
</Flex>
<IconButton
onClick={() => {
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%)',
{!tank.fixed_camouflage && (
<IconButton
onClick={() => {
mutateCompareEphemeral((draft) => {
draft.members[index].camouflage = !camouflage;
});
}}
/>
</IconButton>
variant={camouflage ? 'solid' : 'outline'}
>
<img
src={asset('icons/camo.webp')}
style={{
width: '1em',
height: '1em',
transform: 'scale(2) translate(15%, 15%)',
}}
/>
</IconButton>
)}
</Flex>
</Table.Cell>
);