From 580adf8e297d49f6d0727f0e1dfee6b415094faa Mon Sep 17 00:00:00 2001 From: a04b04 Date: Wed, 8 Jul 2026 14:54:48 +0100 Subject: [PATCH 1/2] Fixed bug --- frontend/app/components/Form.jsx | 50 +++++++++----------------------- 1 file changed, 13 insertions(+), 37 deletions(-) diff --git a/frontend/app/components/Form.jsx b/frontend/app/components/Form.jsx index 13ee79b..f62231e 100644 --- a/frontend/app/components/Form.jsx +++ b/frontend/app/components/Form.jsx @@ -250,6 +250,7 @@ export default function Form() { setSteps(loadedSteps); setHiddenMethodIds(selectedHiddenMethodIds); + setRevealedMethodIds([]); } catch (err) { console.error(err); } @@ -264,32 +265,8 @@ export default function Form() { } useEffect(() => { - if (!clusterId) return; - - let ignore = false; - - async function loadSteps() { - try { - const res = await fetch( - `${process.env.NEXT_PUBLIC_API_URL}/instruction/all/${clusterId}` - ); - - const data = await res.json(); - - if (!ignore) { - setSteps(data.body ?? []); - } - } catch (err) { - console.error(err); - } - } - - loadSteps(); - - return () => { - ignore = true; - }; - }, [clusterId]); + getSteps(); + }, [getSteps]); useEffect(() => { async function getBonusChallenge() { @@ -386,12 +363,12 @@ export default function Form() { : null, checkFocusResult: - checkFocus - ?{ - checkFocusId: checkFocus.id, - reflection: focusReflection.trim() - } - :null + checkFocus + ? { + checkFocusId: checkFocus.id, + reflection: focusReflection.trim() + } + : null }; try { @@ -925,15 +902,14 @@ export default function Form() { Time remaining {!windowReady ? '--:--:--' : timeRemainingMs > 0 - ? formatTimeRemaining(timeRemainingMs) - : 'END'} + ? formatTimeRemaining(timeRemainingMs) + : 'END'} From b4e2fbab4d2f1dc6dc2db7d1611fda13cadd1f7e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 8 Jul 2026 13:57:19 +0000 Subject: [PATCH 2/2] chore: apply formatting --- frontend/app/components/Form.jsx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/frontend/app/components/Form.jsx b/frontend/app/components/Form.jsx index 22f7c27..19aab17 100644 --- a/frontend/app/components/Form.jsx +++ b/frontend/app/components/Form.jsx @@ -362,13 +362,12 @@ export default function Form() { } : null, - checkFocusResult: - checkFocus - ? { - checkFocusId: checkFocus.id, - reflection: focusReflection.trim() - } - : null + checkFocusResult: checkFocus + ? { + checkFocusId: checkFocus.id, + reflection: focusReflection.trim() + } + : null }; try { @@ -899,14 +898,15 @@ export default function Form() { Time remaining {!windowReady ? '--:--:--' : timeRemainingMs > 0 - ? formatTimeRemaining(timeRemainingMs) - : 'END'} + ? formatTimeRemaining(timeRemainingMs) + : 'END'}