Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize Data Fetching and Simplify API Calls #36

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

Adebesin-Cell
Copy link
Member

@Adebesin-Cell Adebesin-Cell commented Jul 12, 2024

Optimize Data Fetching and Simplify API Calls

Changes Made:

  1. Removed Axios and Handler:

    • Eliminated the intermediate API handler and axios dependency.
    • Replaced with direct fetching using the native fetch API.
  2. New Utility Function:

    • Created fetchCoinMarketData to fetch CoinMarketCap data directly.
    • Simplified data extraction and error handling.
  3. Concurrent Data Fetching:

    • Updated Home component to fetch tvl, marketData, and lockOverview concurrently using Promise.all.
  4. Removed wagmi Hook Calls:

    • Removed wagmi hook calls from the codebase.
    • Uninstalled the wagmi package to lighten the application, as it was only used once.

Notes/Observations:

  • Hydration Error:
    • The hydration error in SVG rendering persists. Further investigation is needed to resolve this issue.

Fixes EveripediaNetwork/issues#2834

Copy link

stackblitz bot commented Jul 12, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

vercel bot commented Jul 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
braindao-ui ✅ Ready (Inspect) Visit Preview Jul 12, 2024 5:13am

@Adebesin-Cell Adebesin-Cell merged commit 162bd00 into main Jul 18, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor braindao-ui to use fetch calls not wagmi
2 participants