diff --git a/src/context/theme/index.tsx b/src/context/theme/index.tsx index c8a0c23..c0adb35 100644 --- a/src/context/theme/index.tsx +++ b/src/context/theme/index.tsx @@ -25,7 +25,7 @@ function ThemeProvider({ children }: Readonly) { const isTheSystemThemeDarkMode = systemTheme.matches // return true if the system theme is dark mode const isTheLocalStorageThemeDarkMode = getTheme() === THEME.dark const isDefaultThemeDarkMode = - isTheSystemThemeDarkMode || isTheLocalStorageThemeDarkMode + isTheSystemThemeDarkMode && isTheLocalStorageThemeDarkMode const [isDarkMode, setIsDarkMode] = useState(isDefaultThemeDarkMode) diff --git a/src/storage/theme/getTheme.ts b/src/storage/theme/getTheme.ts index 2dd6268..f7a6b65 100644 --- a/src/storage/theme/getTheme.ts +++ b/src/storage/theme/getTheme.ts @@ -4,7 +4,7 @@ import { APP_THEME } from '../storageConfig' export function getTheme() { const response = localStorage.getItem(APP_THEME) - const theme = response ? JSON.parse(response) : THEME.light + const theme = response ? JSON.parse(response) : THEME.dark return theme as ITheme } diff --git a/src/theme/global.css b/src/theme/global.css index 301afae..43307cd 100644 --- a/src/theme/global.css +++ b/src/theme/global.css @@ -5,7 +5,7 @@ @layer base { :focus-visible { - @apply ring-4 ring-purple-200 outline-none + @apply ring-4 dark:ring-purple-300 ring-purple-200 outline-none } ::selection {