This is my code:
<img src={"/upload/images/"+Currency.getCurrent()+".svg"} />
And this my function:
static getCurrent() {
var currency = "usd"
const cookies = parseCookies()
if (cookies.currency) {
currency = cookies.currency
}
return currency
}
I get this error:
next-dev.js?3515:32 Warning: Prop `src` did not match. Server: "/upload/images/usd.svg" Client: "/upload/images/btc.svg"
So, usd.svg and btc.svg are exists.
For usd I dont have any error, but for btc I get error.
Note: This code return true url:
console.log(Currency.getCurrent()) // /upload/images/btc.svg