Skip to content

refactor(frontend): consolidate Home card options into a single state object#344

Merged
martin-mfg merged 1 commit into
stats-organization:masterfrom
marcalexiei:frontend-options-state
Jul 12, 2026
Merged

refactor(frontend): consolidate Home card options into a single state object#344
martin-mfg merged 1 commit into
stats-organization:masterfrom
marcalexiei:frontend-options-state

Conversation

@marcalexiei

Copy link
Copy Markdown

HomeScreen held ~16 separate useState hooks for card options and threaded them through 34 props into CustomizeStage.
This consolidates them into a single typed CardOptions state object (new pages/Home/cardOptions.ts), updated via a keyed setter.

Changes

  • CustomizeStage props go from 34 to 5; buildCardUrl takes userId, selectedCard and options.
  • Stage descriptions move into STAGE_LABELS, replacing a positional string array in the JSX.
  • The three GitHub-URL paste handlers in CustomizeStage share one pastedPathTail helper.
  • A failed OAuth authenticate call left the page stuck on the loading spinner;
    the exchange now runs in try/catch/finally and the redirect is parsed with
    URLSearchParams instead of substring matching.

@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

@marcalexiei is attempting to deploy a commit to the martin-mfg's projects Team on Vercel.

A member of the Team first needs to authorize it.

@marcalexiei marcalexiei force-pushed the frontend-options-state branch from a438931 to 77602b8 Compare July 11, 2026 11:58
@martin-mfg martin-mfg merged commit b81abe0 into stats-organization:master Jul 12, 2026
5 of 7 checks passed
@marcalexiei marcalexiei deleted the frontend-options-state branch July 12, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants