suryanshsingh2001 / MyLibrary

MyLibrary 📚 is a modern library management web app built with React.js, 🔐 Auth0 for authentication, 📖 Google Books API for book data, and styled with 🎨 Tailwind CSS for a delightful user experience.
https://mylibrary01.vercel.app/
MIT License
25 stars 25 forks source link

Improve Search Bar #41

Closed MokshagnaV closed 1 year ago

MokshagnaV commented 1 year ago

34 Added react-select for Search for suggestions

vercel[bot] commented 1 year ago

Someone is attempting to deploy a commit to a Personal Account owned by @suryanshsingh2001 on Vercel.

@suryanshsingh2001 first needs to authorize it.

vercel[bot] commented 1 year ago

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

Name Status Preview Comments Updated (UTC)
mylibrary ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 16, 2023 9:34am
MokshagnaV commented 1 year ago

All things sorted. And could you please explain what does the toastId part of the code do.

Yes. I have used toastify to notify the errors. When there is any error occurs while typing in the search bar the error will be notified using toastify. But on each change in search bar multiple times the api is called so, many times the toast will display (in case of error).

Therefore, to reduce the multiple toast notification at once. I use toastId. This variable will store the id of currently displaying toast and checks whenever another toast is going to call. If the toastId is active. If it is active, no new toast will display, else new Toast will display. Means a new Toast will be displayed whenever no toast is already active

suryanshsingh2001 commented 1 year ago

Therefore, to reduce the multiple toast notification at once. I use toastId. This variable will store the id of currently displaying toast and checks whenever another toast is going to call. If the toastId is active. If it is active, no new toast will display, else new Toast will display.

Thank you for going through all the trouble! You did a good job in improving the search bar.

MokshagnaV commented 1 year ago

Therefore, to reduce the multiple toast notification at once. I use toastId. This variable will store the id of currently displaying toast and checks whenever another toast is going to call. If the toastId is active. If it is active, no new toast will display, else new Toast will display.

Thank you for going through all the trouble! You did a good job in improving the search bar.

You're very welcome! I'm glad that my work has been helpful to you. I'm here to help for any further issues!

Thank you.