fix: prevent screen flash by loading css vars for both dark and light theme in initial load

This commit is contained in:
Hossein Mehrabi
2023-06-12 03:55:23 +03:30
parent 5496f408d2
commit f4f4e93217
@@ -36,7 +36,7 @@ const useTheme = () => {
const useThemeCssVars = (theme: Theme, light: boolean = false) =>
useMemo(
() => css`
[data-theme='${light ? 'light' : 'dark'}'] {
[data-theme=${light ? 'light' : 'dark'}] {
${theme.cssVars}
}
`,