Fix 1 — Remove the unused getMissionStepClass function (line 331–338)
This helper was never wired up to the progress track nodes. Remove it entirely:
// DELETE this entire function block:
function getMissionStepClass(active: boolean, complete: boolean, progressed: boolean): string {
return [
"mission-step",
active ? "mission-step--active" : "",
complete ? "mission-step--complete" : "",
progressed ? "mission-step--progressed" : "",
].filter(Boolean).join(" ");
}
Fix 2 — Remove progressedStep from state (line 498) and its setter usage (lines 715–716)
The value is set but never consumed. Remove the state declaration:
TSX
// DELETE this line:
const [progressedStep, setProgressedStep] = useState<number | null>(null);
And remove the two lines that reference it in the useEffect around line 713:
TSX
useEffect(() => {
if (activeMissionStep === previousMissionStepRef.current) return;
- setProgressedStep(activeMissionStep); // DELETE
previousMissionStepRef.current = activeMissionStep;
- const timeoutId = window.setTimeout(() => setProgressedStep(null), 850); // DELETE
- return () => window.clearTimeout(timeoutId); // DELETE
}, [activeMissionStep]);
@copilot
Originally posted by @driver727-pixel in #559 (comment)
Fix 1 — Remove the unused getMissionStepClass function (line 331–338)
This helper was never wired up to the progress track nodes. Remove it entirely:
// DELETE this entire function block:
function getMissionStepClass(active: boolean, complete: boolean, progressed: boolean): string {
return [
"mission-step",
active ? "mission-step--active" : "",
complete ? "mission-step--complete" : "",
progressed ? "mission-step--progressed" : "",
].filter(Boolean).join(" ");
}
Fix 2 — Remove progressedStep from state (line 498) and its setter usage (lines 715–716)
The value is set but never consumed. Remove the state declaration:
TSX
// DELETE this line:
const [progressedStep, setProgressedStep] = useState<number | null>(null);
And remove the two lines that reference it in the useEffect around line 713:
TSX
useEffect(() => {
if (activeMissionStep === previousMissionStepRef.current) return;
previousMissionStepRef.current = activeMissionStep;
}, [activeMissionStep]);
@copilot
Originally posted by @driver727-pixel in #559 (comment)