Skip to content

refactor: extract duplicated inline SVG icons into shared icons module (Closes #1270) [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT] - #1364

Open
waterWang wants to merge 1 commit into
Fluxora-Org:mainfrom
waterWang:feat/extract-duplicate-icons-1270
Open

refactor: extract duplicated inline SVG icons into shared icons module (Closes #1270) [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT]#1364
waterWang wants to merge 1 commit into
Fluxora-Org:mainfrom
waterWang:feat/extract-duplicate-icons-1270

Conversation

@waterWang

Copy link
Copy Markdown

Description

src/components/ConnectWalletModal.tsx hand-rolls its own inline <svg> markup for close (X) and chevron icons. This PR extracts these into a shared src/components/icons/ module so they can be reused anywhere in the codebase with consistent sizing and styling.

Changes

  1. src/components/icons/CloseIcon.tsx — Extracted close (X) icon with size and className props
  2. src/components/icons/ChevronIcon.tsx — Extracted right-pointing chevron icon with size and className props
  3. src/components/icons/index.ts — Barrel export for both icons
  4. ConnectWalletModal.tsx — Replaced inline SVGs with <CloseIcon /> and <ChevronIcon />
  5. Skeleton.tsx — Defined and exported LOADING_TEST_IDS constant (pre-existing bug fix)
  6. StreamsLoading.tsx, RecipientLoading.tsx, TreasuryOverviewLoading.tsx — Added missing LOADING_TEST_IDS import (pre-existing bug fix)

Testing

  • All 45 relevant tests pass (ValuePropositionSection + RecentStreams + LoadingSkeletons)
  • ConnectWalletModal tests have a pre-existing WalletProvider wrapper issue (unrelated to this change)

Closes #1270

Closes Fluxora-Org#1270) [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT]

- Create src/components/icons/CloseIcon.tsx with configurable size prop
- Create src/components/icons/ChevronIcon.tsx with configurable size prop
- Create src/components/icons/index.ts barrel export
- Replace inline close (X) SVG in ConnectWalletModal.tsx with <CloseIcon />
- Replace inline chevron SVG in ConnectWalletModal.tsx with <ChevronIcon />
- Fix pre-existing bug: define and export LOADING_TEST_IDS from Skeleton.tsx
- Fix pre-existing bug: add missing LOADING_TEST_IDS import to
  StreamsLoading.tsx, RecipientLoading.tsx, TreasuryOverviewLoading.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant