Skip to content

Commit

Permalink
fix: on mobile, back button should not return to modal url
Browse files Browse the repository at this point in the history
  • Loading branch information
Merkur39 committed Jul 10, 2023
1 parent ec50def commit e00ba18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Modals/ConfirmDeleteModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ const ConfirmDeleteModal = () => {
}
}, [contact, resultContactsQueryById])

const onClose = () => navigate(`/${contactId}`)
const onClose = () => navigate(`/${contactId}`, { replace: true })

const onDeleteContact = async (contactParam = null) => {
navigate('/')
navigate('/', { replace: true })
await deleteContact(client, contactParam ? contactParam : contact)
onDeleteContact && onDeleteContact(contactParam ? contactParam : contact)
}
Expand Down

0 comments on commit e00ba18

Please sign in to comment.