ICSHWI-12016: Fix page reload after IOC deletion
The latest modification on ahooks library already makes a difference on the IOC deletion function because now the browser's latest history item is being overwritten instead of a new item would push to the list. The (successful) deletion then navigates to the previous page (Home, or IOC depending on how you navigated to the IOC details page).
Added a condition: if there was an error the page shouldn't navigate to previous page.