MyShops component

The MyShops component is similar to the Shops component, it fetches the list of shops owned by the current user in componentDIdMount, and renders each shop in a ListItem:

Additionally, each shop has an edit and a delete option, unlike the list of items in shops.

mern-marketplace/client/shop/MyShops.js:

<ListItemSecondaryAction>   <Link to={"/seller/shop/edit/" + shop._id}>       <IconButton aria-label="Edit" color="primary">             <Edit/>       </IconButton>   </Link>   <DeleteShop shop={shop} onRemove={this.removeShop}/></ListItemSecondaryAction>

The Edit button links to the Edit Shop view. The DeleteShop component handles the delete action, and ...

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.