Ensure that config editor success / error is updated each time

This commit is contained in:
Nicolas Mowen 2023-09-15 07:23:40 -06:00 committed by GitHub
parent e7a5215208
commit 3ad884aba9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,10 +28,13 @@ export default function Config() {
}) })
.then((response) => { .then((response) => {
if (response.status === 200) { if (response.status === 200) {
setError('');
setSuccess(response.data); setSuccess(response.data);
} }
}) })
.catch((error) => { .catch((error) => {
setSuccess('');
if (error.response) { if (error.response) {
setError(error.response.data.message); setError(error.response.data.message);
} else { } else {