summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-03-21 12:49:14 +0300
committereug-vs <eug-vs@keemail.me>2021-03-21 12:49:14 +0300
commitea230c4754aca6bf11545cbf12e8784b88bb8ef5 (patch)
tree00735814ed871456db88dd1966b4e7762a95d823
parent7f523b8ebaaf913191ac76e279174e2464dcef0e (diff)
downloadcommercel-ui-ea230c4754aca6bf11545cbf12e8784b88bb8ef5.tar.gz
feat: do now show delete button on create screen
-rw-r--r--src/containers/Service/ServiceItem.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/containers/Service/ServiceItem.tsx b/src/containers/Service/ServiceItem.tsx
index c1f5446..22357c7 100644
--- a/src/containers/Service/ServiceItem.tsx
+++ b/src/containers/Service/ServiceItem.tsx
@@ -30,11 +30,11 @@ const ServiceItem: React.FC = () => {
});
};
- const actions: Action[] = [
+ const actions: Action[] = _.compact([
{ name: 'Назад', variant: 'outlined', onClick: history.goBack },
- { name: 'Удалить', variant: 'outlined', onClick: handleDelete },
+ id && { name: 'Удалить', variant: 'outlined', onClick: handleDelete },
{ name: 'Сохранить', type: 'submit', form: 'form' },
- ];
+ ]);
return (
<Page