project_cryptoverse
project_cryptoverse copied to clipboard
coinId not working
I know that coin ranking API is updated, and now uuid should be used however I updates coinId to uuid in every file it was present. For eg. getCryptoDetails: builder.query({ query: (uuid) => createRequest(
/coin/${uuid}) }) })
It still shows undefined please help
use this
query: (coinId) => createRequest(/coin/${coinId}
)
The two API calls (GET Coin & GET coin price history) don't work for me neither, I think I have the same issue as @itsswarnim. Could you help pls ?
Here is what I have so far
getCryptoDetails: builder.query({ query: (coinId) => createRequest(/coin/${coinId}`),
}),
getCryptoHistory: builder.query({
query: ({ coinId, timeperiod }) => createRequest(`coin/${coinId}/history?timeperiod=${timeperiod}`),
}),
Do it this way and cross check your code with mine. It will work as i had the same error!
getCryptoDetails: builder.query({ query: (coinId) => createRequest('/coin/${coinId}'), })
This line of code does not work for me, and the "coinId" is still undefined.
Please let me know how to fix this issue, thanks in advance!
change path '/crypto/:coinId' to '/coin/:uuid' in app.js, cryptocurrencies.jsx, and in all other where you write and in cryptoApi also change than code is work
change path '/crypto/:coinId' to '/coin/:uuid' in app.js, cryptocurrencies.jsx, and in all other where you write and in cryptoApi also change than code is work
Thanks for your solution. I have changed the path that you mentioned above in app.js, cryptocurrencies.jsx and cryptoApi.js files, but the uuid is still undefined somehow.
If you don't mind, pls take a look at my codes. https://github.com/Bailong-Huang/crptoverse/tree/master/src
🙏
i cant see your code cause link show 404 err but if uuid is undefined make sure in cryptoApi it lookk like this:
getCryptoDetails: builder.query({
query: (uuid) => createRequest(/coin/${uuid}
)
})
i cant see your code cause link show 404 err but if uuid is undefined make sure in cryptoApi it lookk like this: getCryptoDetails: builder.query({ query: (uuid) => createRequest(
/coin/${uuid}
) })
My bad, I forgot to set it to be public. The link should work right now.
Well, I have tried this, but it still is undefined.
ok i got it .. in your ../components/Cryptocurries.jsx change this
<Link to={
/coin/${currency.id}} >
to
<Link`` to={
/coin/${currency.uuid}} >
ok i got it .. in your ../components/Cryptocurries.jsx change this
<Link to={
/coin/${currency.id}} >
to<Link
to={ ``/coin/${currency.uuid}} >
Finally, it works. Thanks for helping me to solve this issue. Appreciation!!
can someone help me i have the same proleme , att firs coinid was undefined , i did dhe changes that @Sumitmaithani but now the id shows as a string "CryptoDetails razxDUgYGNAdQ"
@Omaar99-ev send me your github code or check @Bailong-Huang repo his code is working although you can chec my repo also name mekaverse but i used multiple api's for data
Thanks @Sumitmaithani solved the issue I had !
Thank you @Sumitmaithani !
can someone help me I have the same proleme , att firs coinid was undefined , i did the changes that @Sumitmaithani but now the id shows as a string "CryptoDetails razpDUgYGNAdQ"