From 3ad884aba9dadce9cd4916076cd8ffbfc2faeda7 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Fri, 15 Sep 2023 07:23:40 -0600 Subject: [PATCH] Ensure that config editor success / error is updated each time --- web/src/routes/Config.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/src/routes/Config.jsx b/web/src/routes/Config.jsx index e043bbf28..b85836129 100644 --- a/web/src/routes/Config.jsx +++ b/web/src/routes/Config.jsx @@ -28,10 +28,13 @@ export default function Config() { }) .then((response) => { if (response.status === 200) { + setError(''); setSuccess(response.data); } }) .catch((error) => { + setSuccess(''); + if (error.response) { setError(error.response.data.message); } else {