Skip to content

Commit

Permalink
fix sudoku init bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ayan4m1 committed Feb 5, 2024
1 parent f7fdd9c commit aec13e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/sudoku/cell.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default function SudokuCell({
onChange
}) {
const textRef = useRef(null);
const handleBlur = useCallback(() => onClick(-1, -1), [onClick]);
const handleChange = useCallback(
(event) => {
const newVal = parseInt(event.target.value, 10);
Expand All @@ -41,7 +42,6 @@ export default function SudokuCell({
},
[active, onChange, column, row, handleBlur]
);
const handleBlur = useCallback(() => onClick(-1, -1), [onClick]);

useEffect(() => {
if (active && textRef.current) {
Expand Down

0 comments on commit aec13e4

Please sign in to comment.