diff options
-rw-r--r-- | src/containers/Service/ServiceItem.tsx | 6 |
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 |