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> </Text>
{error && <Alert color='error' text={error} />} {error && <Alert color='error' text={error} />}
{success && ( {success && (
<Alert color='success' text='Account updated successfully' /> <Alert color='success' text='Category updated successfully' />
)} )}
</Box> </Box>
{!categoryLoading ? ( {!categoryLoading ? (
@@ -225,7 +225,10 @@ const CategorySettings = () => {
form.setFieldValue('imageSource', filesource); 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} errorMessage={form.errors.imageName}
/> />
<TextArea <TextArea