-
Notifications
You must be signed in to change notification settings - Fork 18
liron's pr #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
liron's pr #8
Conversation
ShirYahav
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work
|
|
||
| },[timeLeft]) | ||
|
|
||
| function checkCombination(comb: number[], newSquares: (string | null)[]): Boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Boolean → use lowercase boolean for TypeScript consistency
| <Square value={props.squares[6]} onClick={() => props.onSquareClick(6)} isDisabled={props.squares[6] != null || props.isGameOver}/> | ||
| <Square value={props.squares[7]} onClick={() => props.onSquareClick(7)} isDisabled={props.squares[7] != null || props.isGameOver}/> | ||
| <Square value={props.squares[8]} onClick={() => props.onSquareClick(8)} isDisabled={props.squares[8] != null || props.isGameOver}/> | ||
| </div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid repetition here, render the squares with map to keep the code DRY and easier to maintain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(DRY - Don't Repeat Yourself)
No description provided.