react-ui icon indicating copy to clipboard operation
react-ui copied to clipboard

Persist theme in localstrorage

Open jsrikrishna11 opened this issue 4 years ago • 4 comments

After choosing a theme other than the default theme which is 'light'. If I refresh the page, the page theme is being reset to 'light'. This is because, on reload it is calling useState('light')again.

Is it even an issue?

jsrikrishna11 avatar May 16 '20 10:05 jsrikrishna11

It would be nice if it kept the configuration that the user chose.

Go for it!

rubenmoya avatar May 18 '20 05:05 rubenmoya

Yes, We can store the current theme in local-storage (when a user visits the website it will be set tolight by default) and we can update it as per the user convenience.

Thus, When a user visits the site theme will be set as per the user's selected theme (by default it will be set to light).

iamdarshshah avatar May 18 '20 06:05 iamdarshshah

I would like to work on it, unless some else took it up. Let me know :)

jsrikrishna11 avatar May 22 '20 10:05 jsrikrishna11

@jsrikrishna11 Go for it :)

siddharthkp avatar May 22 '20 12:05 siddharthkp