-
Notifications
You must be signed in to change notification settings - Fork 15
Description
In the previous code, there was no feature to save the previous mute preferences for the user, i.e., each time the website loaded, the sounds were un-muted, but after this feature, the mute state/preference will be saved in the local storage, and will be retrieved same as the initial theme properties(props).
Code changes: -
Had to create a new initialMuteState.js file. After that, I created another isMuted variable to get the initial state of the mute preferences inside the getInitialProps.js file, to know if the website is muted already or not. And then created initialMuteState.js file to add respective class to the volume button in each case and added this script using the defer attribute inside the head tag. I had to remove the initial volume-fa-up class from the tag of the volume icon.
Video to demonstrate the changes :-
Notes.app.-.Google.Chrome.2024-01-01.12-30-42.mp4
I'd like to work on the issue if it gets approved.



