Skip to content

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

refactor

AykutSaracf85e32b9c5ed
diff --git a/src/containers/Modals/SchemaModal/index.tsx b/src/containers/Modals/SchemaModal/index.tsx
index 6926c64f..cca0ed6a 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 {