diff --git a/src/TranscriptCard/index.js b/src/TranscriptCard/index.js index cd45290..5b96ab9 100644 --- a/src/TranscriptCard/index.js +++ b/src/TranscriptCard/index.js @@ -21,17 +21,12 @@ import { const TranscriptCard = props => { const handleDelete = () => { - const confirmDeleteText = 'Are you sure you want to delete?'; - const cancelDeleteText = 'Cancelled delete'; + const confirmed = confirm('Are you sure you want to delete?'); - const confirmationPrompt = confirm(confirmDeleteText); - - if (confirmationPrompt) { + if (confirmed) { if (props.handleDeleteItem) { props.handleDeleteItem(props.id); } - } else { - alert(cancelDeleteText); } };