fix: "Tools" preferences' toggles not showing correct initial state (#689)

* fix: Tools toggles not showing correct initial state

* Update app/assets/javascripts/preferences/panes/general-segments/Tools.tsx

Co-authored-by: Mough <mo@standardnotes.org>
This commit is contained in:
Aman Harwara
2021-10-17 02:16:44 +05:30
committed by GitHub
parent 3953713f45
commit 474f1e60e3

View File

@@ -20,13 +20,13 @@ type Props = {
export const Tools: FunctionalComponent<Props> = observer(
({ application }: Props) => {
const [monospaceFont, setMonospaceFont] = useState(() =>
application.getPreference(PrefKey.EditorMonospaceEnabled)
application.getPreference(PrefKey.EditorMonospaceEnabled, true)
);
const [marginResizers, setMarginResizers] = useState(() =>
application.getPreference(PrefKey.EditorResizersEnabled)
application.getPreference(PrefKey.EditorResizersEnabled, true)
);
const [spellcheck, setSpellcheck] = useState(() =>
application.getPreference(PrefKey.EditorSpellcheck)
application.getPreference(PrefKey.EditorSpellcheck, true)
);
const toggleMonospaceFont = () => {