Skip to content

Commit 076076f

Browse files
committed
refactor the code
1 parent 0c202dc commit 076076f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/components/CodeEditor/CodeEditor.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ const EditorControls = ({
113113
outputResult: OutputResult;
114114
}) => {
115115
const router = useRouter();
116-
const [isTheTourCompletedState, setIsTheTourCompletedState] =
117-
useState(isTheTourCompleted());
116+
const [isTheTourCompletedState, setIsTheTourCompletedState] = useState(false);
117+
118118
useEffect(() => {
119119
setIsTheTourCompletedState(isTheTourCompleted());
120-
}, [isTheTourCompleted()]);
120+
}, []);
121121

122122
return (
123123
<div className={styles.buttonsWrapper}>

0 commit comments

Comments
 (0)