1. Removing js-cookie unused library: Because currently I'm only using localStorage to save data.
2. Adding a custom hook, useLocalStorage: For organizing the logic related to localStorage of the site. It only has to deal with the dark mode persistence for now.
3. Adding a next/script to change style before hydrating the page: This was something I learned during this week, and it's related to how you can make critical checks or functionalities before hydrating with the JS files the HTML and CSS ones, more details can be found here in next.js docs: Script Optimization.
This PR has 3 main changes:
1. Removing js-cookie unused library: Because currently I'm only using localStorage to save data.
2. Adding a custom hook, useLocalStorage: For organizing the logic related to localStorage of the site. It only has to deal with the dark mode persistence for now.
3. Adding a next/script to change style before hydrating the page: This was something I learned during this week, and it's related to how you can make critical checks or functionalities before hydrating with the JS files the HTML and CSS ones, more details can be found here in next.js docs: Script Optimization.