From 6e479ea7450c2abb05f4cceb06b15e09ee6d3617 Mon Sep 17 00:00:00 2001 From: edwardbrodski Date: Thu, 21 Sep 2023 23:11:09 +0100 Subject: [PATCH] keep to conventions if it is onClick just call it onClick not callback --- src/TicTacToe/Root.tsx | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/TicTacToe/Root.tsx b/src/TicTacToe/Root.tsx index 406907e..0a59e53 100644 --- a/src/TicTacToe/Root.tsx +++ b/src/TicTacToe/Root.tsx @@ -104,7 +104,7 @@ function TicTacToe() { const callback = () => { playTurn(index); }; - return ; + return ; })} @@ -113,19 +113,12 @@ function TicTacToe() { interface CellProps { state: number; - callback: () => void; + onClick: () => void; } -function TicTacToeCell({ state, callback }: CellProps) { - function handleClick() { - callback(); - } - +function TicTacToeCell({ state, onClick }: CellProps) { return ( -
+

{getStateChar(state)}

);