mirror of
https://github.com/NohamR/gitprofile.git
synced 2026-05-25 04:17:13 +00:00
Rename key of localStorage's property
This commit is contained in:
@@ -12,7 +12,7 @@ const ThemeChanger = () => {
|
|||||||
const changeTheme = (e, selectedTheme) => {
|
const changeTheme = (e, selectedTheme) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
document.querySelector('html').setAttribute('data-theme', selectedTheme);
|
document.querySelector('html').setAttribute('data-theme', selectedTheme);
|
||||||
localStorage.setItem('ezprofileTheme', selectedTheme);
|
localStorage.setItem('ezprofile-theme', selectedTheme);
|
||||||
|
|
||||||
setTheme(selectedTheme);
|
setTheme(selectedTheme);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ export const getInitialTheme = () => {
|
|||||||
return config.themeConfig.default;
|
return config.themeConfig.default;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (localStorage.hasOwnProperty('ezprofileTheme')) {
|
if (localStorage.hasOwnProperty('ezprofile-theme')) {
|
||||||
let theme = localStorage.getItem('ezprofileTheme');
|
let theme = localStorage.getItem('ezprofile-theme');
|
||||||
return theme;
|
return theme;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user