Skip to content

refactor: extract ThankYouNote component from index page#509

Open
hassaansaleem28 wants to merge 15 commits intojenkins-infra:mainfrom
hassaansaleem28:refactor/section-community-stats-507
Open

refactor: extract ThankYouNote component from index page#509
hassaansaleem28 wants to merge 15 commits intojenkins-infra:mainfrom
hassaansaleem28:refactor/section-community-stats-507

Conversation

@hassaansaleem28
Copy link
Contributor

@hassaansaleem28 hassaansaleem28 commented Feb 15, 2026

Description

Refactors the "Thank You" / Community Stats section from src/pages/index.js into a separate component src/Components/CommunityStats.jsx

Goal:

The primary goal of this PR is to clean up index.js by decoupling the stats fetching logic and UI.

Changes:

  • Moved data fetching (axios, PapaParse) and state management into CommunityStats.jsx.
  • Moved the "Thank You" card UI markup into the new component.
  • Removed unused imports and ~100 lines of code from index.js.

Note:
Currently, the component fetches its own data. Future improvements could allow passing data as props to make it fully reusable for other contexts.

Related Issue

Fixes #507

Verification

  • Verified locally by running npm run develop.
  • Confirmed that the "Thank You" section still renders correctly at the bottom of the home page.
  • Confirmed that data is fetched and displayed as expected.

Signed-off-by: Muhammad Hassaan Saleem <iamhassaans@gmail.com>
@hassaansaleem28 hassaansaleem28 requested a review from a team as a code owner February 15, 2026 17:09
@krisstern krisstern changed the title Refactor: Extract CommunityStats component from index page refactor: extract CommunityStats component from index page Feb 17, 2026
@krisstern krisstern added the enhancement New feature or request label Feb 17, 2026
Signed-off-by: Muhammad Hassaan Saleem <iamhassaans@gmail.com>
@hassaansaleem28
Copy link
Contributor Author

Hey @krisstern, this looks good to me now.

Copy link
Member

@krisstern krisstern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the component name from "src/Components/CommunityStats.jsx" to "src/Components/ThankYouNote.jsx"

Signed-off-by: Muhammad Hassaan Saleem <iamhassaans@gmail.com>
Signed-off-by: Muhammad Hassaan Saleem <iamhassaans@gmail.com>
@hassaansaleem28
Copy link
Contributor Author

@krisstern Kindly review this pr and let me know if any further changes required. Thanks for your time.

@krisstern krisstern changed the title refactor: extract CommunityStats component from index page refactor: extract ThankYouNote component from index page Feb 28, 2026
krisstern
krisstern previously approved these changes Feb 28, 2026
@krisstern
Copy link
Member

@hassaansaleem28 would you mind pushing an empty commit so I could approve and merge this?

Signed-off-by: Muhammad Hassaan Saleem <iamhassaans@gmail.com>
Signed-off-by: Muhammad Hassaan Saleem <iamhassaans@gmail.com>
@hassaansaleem28
Copy link
Contributor Author

Hi @krisstern, just a gentle reminder -- could u plz take a look at this pr? It's ready for merge

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor "Thank You" Section into a Component

2 participants