The DeleteMedia component

The DeleteMedia component is added to the Media component and is only visible to the signed-in user who added this specific media. This component takes the media ID and title as props:

This DeleteMedia component is basically an icon button that on click opens a confirm dialog to ask the user whether they are sure they want to delete their video.

mern-mediastream/client/media/DeleteMedia.js:

<IconButton aria-label="Delete" onClick={this.clickButton} color="secondary">    <DeleteIcon/></IconButton><Dialog open={this.state.open} onClose={this.handleRequestClose}> <DialogTitle>{"Delete "+this.props.mediaTitle}</DialogTitle> ...

Get Full-Stack React Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.