overextended / ox_lib

A FiveM resource and script library for Lua and JS.
https://overextended.dev/ox_lib
GNU Lesser General Public License v3.0
305 stars 406 forks source link

refactor(web/notify): changed useRef to useState to prevent resetting the circle on notifications without an ID and organized the code. #566

Closed RrybaN closed 5 months ago

RrybaN commented 5 months ago

Using useRef causes notifications without an ID resets or re-renders the circle duration so i changed it back to useState to avoid re-rendering. Additionally, I've made some improvements and organized the code.