Update category settings page

This commit is contained in:
Hazem Krimi
2021-05-26 23:45:28 +01:00
parent e80c21cc29
commit 008bcda100
+3
View File
@@ -62,6 +62,7 @@ const CategorySettings = () => {
onCompleted({ updateCategory: data }) { onCompleted({ updateCategory: data }) {
setCategory(data); setCategory(data);
setSuccess(true); setSuccess(true);
setTimeout(() => setSuccess(false), 3000);
}, },
onError({ graphQLErrors }) { onError({ graphQLErrors }) {
setError(graphQLErrors[0]?.extensions?.info); setError(graphQLErrors[0]?.extensions?.info);
@@ -234,6 +235,8 @@ const CategorySettings = () => {
value={form.values.description} value={form.values.description}
onChange={form.handleChange} onChange={form.handleChange}
onBlur={form.handleBlur} onBlur={form.handleBlur}
error={form.touched.description && !!form.errors.description}
errorMessage={form.errors.description}
/> />
<Box <Box
marginTop='0.5rem' marginTop='0.5rem'