Skip to content

Fix 1 — Remove the unused getMissionStepClass function (line 331–338) #560

Description

@driver727-pixel

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions