Skip to content

Build your personal knowledge base with Trilium Notes

chore(options/text): address requested changes

Elian Dorana4e539e16327
diff --git a/apps/client/src/widgets/type_widgets/options/text_notes.tsx b/apps/client/src/widgets/type_widgets/options/text_notes.tsx
index ce57c8814e..15506b1196 100644
--- a/apps/client/src/widgets/type_widgets/options/text_notes.tsx
+++ b/apps/client/src/widgets/type_widgets/options/text_notes.tsx
@@ -286,10 +286,6 @@ function CodeBlockStyle() {
loadHighlightingTheme(effectiveTheme);
}, [effectiveTheme]);
- const onThemeChange = (newTheme: string) => {
- setCodeBlockTheme(newTheme);
- };
-
return (
<OptionsSection title={t("highlighting.title")}>
<ThemeModeSelector matchesApp={matchesApp} onMatchesAppChange={setMatchesApp} />
@@ -316,7 +312,7 @@ function CodeBlockStyle() {
<FormSelectWithGroups
values={groupedThemes}
keyProperty="val" titleProperty="title"
- currentValue={codeBlockTheme} onChange={onThemeChange}
+ currentValue={codeBlockTheme} onChange={setCodeBlockTheme}
/>
</OptionsRow>
)}