diff --git a/components/sheet-editor.tsx b/components/sheet-editor.tsx index 7c290c1..b056a35 100644 --- a/components/sheet-editor.tsx +++ b/components/sheet-editor.tsx @@ -25,7 +25,7 @@ const PureSpreadsheetEditor = ({ status, isCurrentVersion, }: SheetEditorProps) => { - const { theme } = useTheme(); + const { resolvedTheme } = useTheme(); const parseData = useMemo(() => { if (!content) return Array(MIN_ROWS).fill(Array(MIN_COLS).fill('')); @@ -111,7 +111,7 @@ const PureSpreadsheetEditor = ({ return ( setTheme(theme === 'dark' ? 'light' : 'dark')} + onSelect={() => setTheme(resolvedTheme === 'dark' ? 'light' : 'dark')} > - {`Toggle ${theme === 'light' ? 'dark' : 'light'} mode`} + {`Toggle ${resolvedTheme === 'light' ? 'dark' : 'light'} mode`}