풀이가 끝나고 나서, 첫 화면으로 돌아온 뒤 다시 시작할 때 결과화면이 나오는 오류 수정
This commit is contained in:
@@ -14,6 +14,7 @@ export default function StartControls() {
|
||||
(state) => state.selectedProblemCount,
|
||||
);
|
||||
const setProblemCount = useGameStore((state) => state.setProblemCount);
|
||||
const initSession = useGameStore((state) => state.initSession);
|
||||
|
||||
useEffect(() => {
|
||||
startLinkRef.current?.focus();
|
||||
@@ -25,6 +26,7 @@ export default function StartControls() {
|
||||
<Link
|
||||
ref={startLinkRef}
|
||||
href={`/play?count=${selectedProblemCount}`}
|
||||
onClick={() => initSession(selectedProblemCount)}
|
||||
className="inline-flex h-12 items-center justify-center rounded-md bg-emerald-700 px-6 text-base font-semibold text-white transition hover:bg-emerald-800 focus:outline-none focus:ring-2 focus:ring-emerald-500 focus:ring-offset-2"
|
||||
>
|
||||
연습 시작
|
||||
|
||||
Reference in New Issue
Block a user