diff --git a/lib/src/Components/Map/Subcomponents/ItemViewPopup.tsx b/lib/src/Components/Map/Subcomponents/ItemViewPopup.tsx index aa7065ea..fe7e4107 100644 --- a/lib/src/Components/Map/Subcomponents/ItemViewPopup.tsx +++ b/lib/src/Components/Map/Subcomponents/ItemViewPopup.tsx @@ -92,7 +92,11 @@ export const ItemViewPopup = forwardRef((props: ItemViewPopupProps, ref: any) => api={props.item.layer?.api} item={props.item} editCallback={handleEdit} - deleteCallback={handleDelete} + deleteCallback={(e: React.MouseEvent) => { + handleDelete(e).catch(() => { + // Error handling is already in handleDelete + }) + }} setPositionCallback={() => { map.closePopup() setSelectPosition(props.item) diff --git a/lib/src/Components/Profile/ProfileView.tsx b/lib/src/Components/Profile/ProfileView.tsx index ff115283..8e3813bf 100644 --- a/lib/src/Components/Profile/ProfileView.tsx +++ b/lib/src/Components/Profile/ProfileView.tsx @@ -181,7 +181,11 @@ export function ProfileView({ attestationApi }: { attestationApi?: ItemsApi ) => handleDelete(e, item, setLoading, removeItem, map, navigate)} + deleteCallback={(e: React.MouseEvent) => { + handleDelete(e, item, setLoading, removeItem, map, navigate).catch(() => { + // Error handling is already in handleDelete + }) + }} editCallback={() => navigate('/edit-item/' + item.id)} setPositionCallback={() => { map.closePopup()