From 6c9e2aef04dc7dbc81f3a5126d90e8b08505d92e Mon Sep 17 00:00:00 2001 From: Christopher Date: Sun, 18 Apr 2021 21:51:41 +0200 Subject: [PATCH] fix(contacts): dont send a object when deleting a contact --- phone/src/apps/contacts/components/views/ContactInfo.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/phone/src/apps/contacts/components/views/ContactInfo.tsx b/phone/src/apps/contacts/components/views/ContactInfo.tsx index 01dfbf0..8b8963b 100644 --- a/phone/src/apps/contacts/components/views/ContactInfo.tsx +++ b/phone/src/apps/contacts/components/views/ContactInfo.tsx @@ -51,9 +51,9 @@ const ContactsInfoPage = () => { const Nui = useNuiRequest(); const classes = useStyles(); const history = useHistory(); - + const { getContact } = useContacts(); - + const { id } = useParams(); const { addNumber, referal } = useQueryParams({ referal: '/contacts', @@ -109,9 +109,7 @@ const ContactsInfoPage = () => { data: contact, level: 2, }); - Nui.send(ContactEvents.DELETE_CONTACT, { - id: contact.id, - }); + Nui.send(ContactEvents.DELETE_CONTACT, contact.id); history.goBack(); };