Commit c31b7793 authored by tom's avatar tom

[skip ci] sync color mode value in cookie and in local storage

parent ce8e0bb1
......@@ -35,6 +35,7 @@ const ColorModeSwitch = () => {
window.document.documentElement.style.setProperty(varName, hex);
cookies.set(cookies.NAMES.COLOR_MODE_HEX, hex);
window.localStorage.setItem(cookies.NAMES.COLOR_MODE, nextTheme.colorMode);
}, [ setColorMode ]);
React.useEffect(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment