fix: move isDark declaration outside palette IIFE
This commit is contained in:
@@ -7,12 +7,12 @@ import { SseProvider } from './SseProvider'
|
|||||||
|
|
||||||
function AppThemeInner({ children }: PropsWithChildren) {
|
function AppThemeInner({ children }: PropsWithChildren) {
|
||||||
const controller = useThemeController()
|
const controller = useThemeController()
|
||||||
|
const isDark = controller.resolvedMode === 'dark'
|
||||||
|
|
||||||
const theme = useMemo(
|
const theme = useMemo(
|
||||||
() =>
|
() =>
|
||||||
createTheme({
|
createTheme({
|
||||||
palette: (() => {
|
palette: (() => {
|
||||||
const isDark = controller.resolvedMode === 'dark'
|
|
||||||
const common = { mode: controller.resolvedMode }
|
const common = { mode: controller.resolvedMode }
|
||||||
|
|
||||||
const text = isDark
|
const text = isDark
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user