From a8c0c64303ecea3c8fb36f80a603d9b6791b46c3 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Mon, 5 Dec 2022 21:16:13 -0700 Subject: [PATCH] Add error --- web/src/routes/Config.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/src/routes/Config.jsx b/web/src/routes/Config.jsx index 23656ae57..8c10c9084 100644 --- a/web/src/routes/Config.jsx +++ b/web/src/routes/Config.jsx @@ -1,4 +1,4 @@ -import { h, Fragment } from 'preact'; +import { h } from 'preact'; import useSWR from 'swr'; import CodeEditor from '@uiw/react-textarea-code-editor'; import ActivityIndicator from '../components/ActivityIndicator'; @@ -8,6 +8,7 @@ import { useState } from 'preact/hooks'; export default function Config() { const { data: config } = useSWR('config/raw'); const [newCode, setNewCode] = useState(config); + const [error, setError] = useState(); if (!config) { return ; @@ -17,6 +18,8 @@ export default function Config() {
Config + {error &&
There is an error
} + setNewCode(e.target.value)} />
);