Skip to content

Integrate SWR/React Query for live TVLChart data #7

Description

@Code-Paragon

Problem

The TVLChart.tsx currently renders an array of static mockData, failing to represent the actual historical Total Value Locked of the protocol as required by the frontend-guide.md.

Expected behavior

The component implements SWR or @tanstack/react-query to fetch historical TVL metrics from the protocol's indexer API, mapping the payload to the { name, tvl } shape required by recharts.

Files to update

  • src/components/TVLChart.tsx
  • package.json

Project relevance

This transitions the main landing page from a static mockup to a live, data-driven analytics dashboard that proves protocol traction.

Acceptance criteria

  • Feature works as described
  • Tests are added or updated where needed
  • Documentation is updated where needed
  • swr or @tanstack/react-query is added to package dependencies
  • No TypeScript, lint, test, or build errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions