풀이가 끝나고 나서, 첫 화면으로 돌아온 뒤 다시 시작할 때 결과화면이 나오는 오류 수정
This commit is contained in:
@@ -14,6 +14,7 @@ export default function StartControls() {
|
|||||||
(state) => state.selectedProblemCount,
|
(state) => state.selectedProblemCount,
|
||||||
);
|
);
|
||||||
const setProblemCount = useGameStore((state) => state.setProblemCount);
|
const setProblemCount = useGameStore((state) => state.setProblemCount);
|
||||||
|
const initSession = useGameStore((state) => state.initSession);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
startLinkRef.current?.focus();
|
startLinkRef.current?.focus();
|
||||||
@@ -25,6 +26,7 @@ export default function StartControls() {
|
|||||||
<Link
|
<Link
|
||||||
ref={startLinkRef}
|
ref={startLinkRef}
|
||||||
href={`/play?count=${selectedProblemCount}`}
|
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"
|
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"
|
||||||
>
|
>
|
||||||
연습 시작
|
연습 시작
|
||||||
|
|||||||
+1
-2
@@ -20,8 +20,7 @@ export default function Home() {
|
|||||||
<StartControls />
|
<StartControls />
|
||||||
|
|
||||||
<div className="border-l-4 border-emerald-700 pl-4 text-sm leading-6 text-slate-600">
|
<div className="border-l-4 border-emerald-700 pl-4 text-sm leading-6 text-slate-600">
|
||||||
<p>이번 단계에서는 화면 이동만 확인합니다.</p>
|
<p>반복할 문제 수를 선택한 뒤, [연습 시작] 버튼을 클릭하세요.</p>
|
||||||
<p>문제 생성과 채점은 다음 이터레이션에서 추가합니다.</p>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
Reference in New Issue
Block a user