Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Get coingecko currrencies#1

Open
edoardo-bluframe wants to merge 8 commits intoWeAreDauntless:mainfrom
edoardo-bluframe:get-coingecko-currrencies
Open

Get coingecko currrencies#1
edoardo-bluframe wants to merge 8 commits intoWeAreDauntless:mainfrom
edoardo-bluframe:get-coingecko-currrencies

Conversation

@edoardo-bluframe
Copy link
Copy Markdown

No description provided.

…currency page

This commit adds the CoinGecko API to fetch data for displaying cryptocurrency information on both the homepage and currency page. It also adds a new type `Coin` in `types.ts`. The homepage now displays real-time data for 45 cryptocurrencies, while the currency page displays detailed information about a specific cryptocurrency.
This commit adds two new API routes to fetch coin data from the Coingecko API. The `/api/coins` route returns a list of 45 coins, while the `/api/coins/[symbol]` route returns data for a specific coin based on its symbol. The currency page and home page have been updated to use these new routes instead of making direct requests to the Coingecko API.
Improve user experience by adding a container with minimum height to the loading and error messages in both the Currency and Home pages.
Two new hooks added to fetch coin data and coins list. Our code was updated to use these hooks instead of making API calls
✨ Use fetchCoin and fetchCoins in useCoin and useCoins hooks respectively

🔧 Update _app.tsx to use Hydrate component for SSR

🚀 Implement server-side rendering with getServerSideProps for index.tsx and currency/[symbol].tsx
This commit adds test files for fetching coin and coins data from the API. It also includes mock data to be used in the tests. The tests use Jest, React Testing Library, and react-query library.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant