mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
fix(contacts): dont send a object when deleting a contact
This commit is contained in:
1 parent
478d4d4519
commit
6c9e2aef04
1 file changed
+3
-5
@@ -51,9 +51,9 @@ const ContactsInfoPage = () => {
|
|||||||
const Nui = useNuiRequest();
|
const Nui = useNuiRequest();
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
|
|
||||||
const { getContact } = useContacts();
|
const { getContact } = useContacts();
|
||||||
|
|
||||||
const { id } = useParams<ContactInfoRouteParams>();
|
const { id } = useParams<ContactInfoRouteParams>();
|
||||||
const { addNumber, referal } = useQueryParams<ContactInfoRouteQuery>({
|
const { addNumber, referal } = useQueryParams<ContactInfoRouteQuery>({
|
||||||
referal: '/contacts',
|
referal: '/contacts',
|
||||||
@@ -109,9 +109,7 @@ const ContactsInfoPage = () => {
|
|||||||
data: contact,
|
data: contact,
|
||||||
level: 2,
|
level: 2,
|
||||||
});
|
});
|
||||||
Nui.send(ContactEvents.DELETE_CONTACT, {
|
Nui.send(ContactEvents.DELETE_CONTACT, contact.id);
|
||||||
id: contact.id,
|
|
||||||
});
|
|
||||||
history.goBack();
|
history.goBack();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user