Skip to content

Implement raffle detail page with merged contract + metadata #22

@Otaiki1

Description

@Otaiki1

Context

The raffle detail page should show both onchain data (price, tickets sold, end time, winner) and off-chain metadata (title, description, image). The backend merges these; the client just consumes GET /raffles/:id.

Goal

  • Raffle detail page (e.g. /raffles/:id) fetches GET /raffles/:id and renders: image, title, description, ticket price, tickets sold / max, end time, status, and CTA (buy ticket, or winner/refund if finalized/cancelled).
  • Handle 404 and loading state; optional: real-time updates or refetch on focus.

Contributor guide

  1. Directory: client/
  2. Add route and page component for /raffles/:id. Use a hook (e.g. useRaffle(id)) that fetches from backend.
  3. Map backend response to UI: use merged fields (title, description, image_url from metadata; price, tickets_sold, status from indexer/contract).
  4. Add "Buy ticket" button that triggers SDK ticket purchase flow (separate issue if not done).
  5. Ensure design matches existing Tikka UI (cards, typography).

References

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions