Next.js Discord

Discord Forum

Toastify toast not showing properly

Answered
Chinese Alligator posted this in #help-forum
Open in Discord
Chinese AlligatorOP
so for some reason the the toastify notification doesnt work properly i gewt it at the bottom of my page and it doesnt have the style and it never dissapears? what is the problem ?
Answered by Chinese Alligator
i found the problem... i literally forgot to import "react-toastify/dist/ReactToastify.css";... last time i used it i don't remember that i had to do that but here we go... thanks again
View full answer

9 Replies

Asian black bear
To ensure you get the best possible assistance, could you please change your thread title to be more descriptive? Specific titles attract the attention of users who can help and make it easier for others to find similar solutions in the future.
@Chinese Alligator so for some reason the the toastify notification doesnt work properly i gewt it at the bottom of my page and it doesnt have the style and it never dissapears? what is the problem ?
not the answer to your question, but found couple of mistakes from your code.
you should use relative path when you fetch data from your api route. don't need to do ${api}/auth...
also I would recommend use router instead of window.location.href
regarding the toast stuff, are you sure your entire app is wrapped by toast provider?
Chinese AlligatorOP
thank you for the tips really appreciate it
Chinese AlligatorOP
i found the problem... i literally forgot to import "react-toastify/dist/ReactToastify.css";... last time i used it i don't remember that i had to do that but here we go... thanks again
Answer
and the styles from the library
omg, delayed lol
anyway good to hear it's solved