Skip to content

Integrate Queries with Bounty Components #33

Description

@0xdevcollins

Objective

Replace mock data with real API queries in bounty components using TanStack Query hooks.

Tasks

  • Update app/page.tsx to use useBounties() hook
  • Convert components/bounty/bounty-card.tsx to use real data
  • Create components/bounty/bounty-list.tsx with query integration
  • Add loading skeletons for query states
  • Add error states with retry functionality
  • Implement empty states for no results
  • Add refetch on focus and reconnect

Implementation Details

  • Remove all mock/hardcoded bounty data
  • Add proper loading states (skeletons)
  • Handle error states with toast notifications
  • Show empty state when no bounties found
  • Enable background refetching

Files to Modify

  • app/page.tsx
  • components/bounty/bounty-card.tsx
  • components/bounty/bounty-list.tsx (new)

Files to Create

  • components/bounty/bounty-skeleton.tsx
  • components/bounty/bounty-error.tsx
  • components/bounty/bounty-empty.tsx

Acceptance Criteria

  • All components fetch real data from API
  • Loading states show appropriate skeletons
  • Errors display with retry options
  • Empty states guide users appropriately
  • Data automatically refetches on window focus

NOTE: Leave a guide on how to test with mock data and provide a screen record of your working implementation

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions