Skip to content

feat: wire Activity Feed to real API data (#822)#1364

Open
aglichandrap wants to merge 4 commits into
SolFoundry:mainfrom
aglichandrap:feat/wire-activity-feed
Open

feat: wire Activity Feed to real API data (#822)#1364
aglichandrap wants to merge 4 commits into
SolFoundry:mainfrom
aglichandrap:feat/wire-activity-feed

Conversation

@aglichandrap
Copy link
Copy Markdown

Summary

Wires the home page Activity Feed to fetch real events from GET /api/activity instead of showing hardcoded mock data.

Resolves #822

Changes

  • frontend/src/api/activity.ts — New API client for /api/activity endpoint with graceful fallback
  • frontend/src/hooks/useActivity.ts — React Query hook with 30-second auto-polling
  • frontend/src/components/home/ActivityFeed.tsx — Imports shared ActivityEvent type from API module
  • frontend/src/pages/HomePage.tsx — Wires useActivity() hook, passes real events to <ActivityFeed />

Acceptance Criteria

  • Activity feed shows real events from the API
  • Events update without page refresh (30s polling via refetchInterval)
  • Shows mock data as fallback when API is unavailable
  • Graceful error handling

Technical Notes

  • Uses the same apiClient pattern as bounties.ts and leaderboard.ts
  • React Query placeholderData: [] prevents loading flash
  • retry: false avoids noisy retries when the endpoint doesn't exist yet
  • Mock data preserved as fallback until the backend endpoint is deployed

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

Labels

missing-wallet PR is missing a Solana wallet for bounty payout

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🏭 Bounty T1: Wire Activity Feed to Real API Data

1 participant