decentraland / decentraland/builder
Refactor the ConfirmDelete modal to be used everywhere a delete confirmation is needed
- Dominant language
- TypeScript
- Stars
- 156
- Forks
- 91
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 31
Description
## 🎉 Description
There are componentes like `src/components/ProjectCard/ProjectCard.tsx` `src/components/CollectionsPage/CollectionCard/CollectionCard.tsx` and `src/components/CollectionsPage/ItemCard/ItemCard.tsx` that use as a confirmation modal for the deletion of the entity they represent, a `Confirm` component, but there are other componentes, like `src/components/CollectionDetailPage/CollectionContextMenu/CollectionContextMenu.tsx` that use the `ConfirmDelete` component.
The main issue is that the `ConfirmDelete` component receives a component and attaches the `onClick` function to open the modal, but the mentioned componentes that don't use `ConfirmDelete` have dynamically generated componentes.
Find a way to use only one component that has the same header but variable body to be used for the confirmation of deleting entities.
Contributor guide
Assessment
This issue has not been assessed yet.