1
0
Fork 0

fix(website): remove custom theme localStorage logic

This commit is contained in:
François Chalifour 2020-12-01 15:42:34 +01:00
parent 6251f79d7a
commit f2771be114

View file

@ -12,16 +12,6 @@ import 'tailwindcss/tailwind.css';
function Home() {
const { withBaseUrl } = useBaseUrlUtils();
if (
localStorage.theme === 'dark' ||
(!('theme' in localStorage) &&
window.matchMedia('(prefers-color-scheme: dark)').matches)
) {
document.querySelector('html').classList.add('dark');
} else {
document.querySelector('html').classList.remove('dark');
}
return (
<>
<div className="pb-16 relative overflow-hidden">