fix errors and warnings

This commit is contained in:
Viktor Rådberg
2023-09-18 11:33:30 +02:00
parent 4230032d6f
commit de30682597
16 changed files with 144 additions and 143 deletions

View File

@@ -3,7 +3,7 @@ import styled from 'styled-components';
import { css } from 'styled-components';
import { CommanderDamage } from '../Buttons/CommanderDamage';
const CommanderDamageGrid = styled.div<{ rotation: number }>`
const CommanderDamageGrid = styled.div<{ $rotation: number }>`
display: flex;
flex-direction: row;
flex-grow: 1;
@@ -11,8 +11,8 @@ const CommanderDamageGrid = styled.div<{ rotation: number }>`
${(props) => {
if (
props.rotation === Rotation.SideFlipped ||
props.rotation === Rotation.Side
props.$rotation === Rotation.SideFlipped ||
props.$rotation === Rotation.Side
) {
return css`
flex-direction: column;
@@ -37,7 +37,10 @@ const CommanderDamageBar = ({
setLifeTotal,
}: CommanderDamageBarProps) => {
return (
<CommanderDamageGrid rotation={player.settings.rotation} key={player.key}>
<CommanderDamageGrid
$rotation={player.settings.rotation}
key={player.index}
>
{opponents.map((opponent) => {
if (!opponent.settings.useCommanderDamage) {
return null;
@@ -48,7 +51,7 @@ const CommanderDamageBar = ({
opponent={opponent}
setLifeTotal={setLifeTotal}
onPlayerChange={onPlayerChange}
key={opponent.key}
key={opponent.index}
/>
);
})}