Complete category settings

This commit is contained in:
Hazem Krimi
2021-05-28 17:41:49 +01:00
parent 682776a3c6
commit 54b9366f64
+5 -2
View File
@@ -174,7 +174,7 @@ const CategorySettings = () => {
</Text>
{error && <Alert color='error' text={error} />}
{success && (
<Alert color='success' text='Account updated successfully' />
<Alert color='success' text='Category updated successfully' />
)}
</Box>
{!categoryLoading ? (
@@ -225,7 +225,10 @@ const CategorySettings = () => {
form.setFieldValue('imageSource', filesource);
}
}}
error={!!form.errors.imageName || !!form.errors.imageSource}
error={
form.touched.imageName &&
(!!form.errors.imageName || !!form.errors.imageSource)
}
errorMessage={form.errors.imageName}
/>
<TextArea