Skip to content

Commit

Permalink
Fixes frontend warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Griffiths committed Apr 29, 2023
1 parent 3e8f053 commit 0fd535b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ const ModalButton = styled.button`
}
`

export function Button({ children, onClick, style="primary" }: any) {
export function Button({ children, onClick, type="primary" }: any) {

if(style === "primary") {
if(type === "primary") {
return (
<ButtonWrapper onClick={onClick}>
{children}
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/components/Game/GameOverModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const GameOverModal = ({ isOpen, onClose, type="Draw", endType="Stalemate
}
}
}
}, [isOpen, displayedScore, elo]);
}, [isOpen, displayedScore, elo, newElo]);


if(type === "Lose") {
Expand Down Expand Up @@ -167,8 +167,8 @@ export const GameOverModal = ({ isOpen, onClose, type="Draw", endType="Stalemate
{displayedScore}
</ModalTextContent>
<ButtonHolder>
<Button onClick={handleRematch} style="modal">Rematch</Button>
<Button onClick={handleNewGame} style="modal">New Game</Button>
<Button onClick={handleRematch} type="modal">Rematch</Button>
<Button onClick={handleNewGame} type="modal">New Game</Button>
</ButtonHolder>
</ModalContent>
</ModalContainer>
Expand All @@ -191,8 +191,8 @@ export const GameOverModal = ({ isOpen, onClose, type="Draw", endType="Stalemate
{displayedScore}
</ModalTextContent>
<ButtonHolder>
<Button onClick={handleRematch} style="modal">Rematch</Button>
<Button onClick={handleNewGame} style="modal">New Game</Button>
<Button onClick={handleRematch} type="modal">Rematch</Button>
<Button onClick={handleNewGame} type="modal">New Game</Button>
</ButtonHolder>
</ModalContent>
</ModalContainer>
Expand Down

0 comments on commit 0fd535b

Please sign in to comment.