We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4b273f commit 1834a8bCopy full SHA for 1834a8b
1 file changed
src/contexts/MainContextProvider/index.jsx
@@ -1,10 +1,7 @@
1
import React, { useReducer, createContext } from 'react';
2
import MainReducer from '../../reducers/MainReducer';
3
4
-const darkThemeMq = typeof window !== 'undefined' && window.matchMedia('(prefers-color-scheme: dark)').matches;
5
-const dark = darkThemeMq ? 1 : 0;
6
-
7
-const themeIndex = typeof window !== 'undefined' && localStorage.themeIndex ? parseFloat(localStorage.themeIndex) : dark;
+const themeIndex = typeof window !== 'undefined' && localStorage.themeIndex ? parseFloat(localStorage.themeIndex) : 0;
8
const themeColorIndex = typeof window !== 'undefined' && localStorage.themeColorIndex
9
? parseFloat(localStorage.themeColorIndex)
10
: 0;
0 commit comments