May 2018
Intermediate to advanced
470 pages
13h 54m
English
The DeleteShop component is added to the MyShops component for each shop in the list. It takes the shop object and a onRemove method as props from MyShops:

This 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 shop.
mern-marketplace/client/shop/DeleteShop.js:
<IconButton aria-label="Delete" onClick={this.clickButton} color="secondary"> <DeleteIcon/></IconButton><Dialog open={this.state.open} onRequestClose={this.handleRequestClose}> <DialogTitle>{"Delete "+this.props.shop.name}</DialogTitle> <DialogContent> <DialogContentText>Read now
Unlock full access