// @ts-check //////////////////////////////////////// let existingTheme = localStorage.getItem("theme"); //////////////////////////////////////// if (!existingTheme) { localStorage.setItem("theme", "light"); existingTheme = "light"; } else if (existingTheme?.match(/dark/)) { document.documentElement.className = "dark"; } else if (existingTheme?.match(/light/)) { document.documentElement.className = "light"; }