From f85e32b9c5ed6b3de74ab664d676c478f7bf5484 Mon Sep 17 00:00:00 2001 From: AykutSarac Date: Wed, 13 Nov 2024 23:41:57 +0300 Subject: [PATCH] refactor --- src/containers/Modals/SchemaModal/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/Modals/SchemaModal/index.tsx b/src/containers/Modals/SchemaModal/index.tsx index 6926c64..cca0ed6 100644 --- a/src/containers/Modals/SchemaModal/index.tsx +++ b/src/containers/Modals/SchemaModal/index.tsx @@ -13,6 +13,7 @@ import useFile from "src/store/useFile"; export const SchemaModal = ({ opened, onClose }: ModalProps) => { const setContents = useFile(state => state.setContents); const setJsonSchema = useFile(state => state.setJsonSchema); + const darkmodeEnabled = useConfig(state => (state.darkmodeEnabled ? "vs-dark" : "light")); const [schema, setSchema] = React.useState( JSON.stringify( { @@ -32,7 +33,6 @@ export const SchemaModal = ({ opened, onClose }: ModalProps) => { 2 ) ); - const darkmodeEnabled = useConfig(state => (state.darkmodeEnabled ? "vs-dark" : "light")); const onApply = () => { try {