default
talawa-admin • Docs
talawa-admin / screens/FundCampaignPledge/PledgeDeleteModal / default
Function: default()
> default(props
, deprecatedLegacyContext
?): ReactNode
A modal dialog for confirming the deletion of a pledge.
Parameters
• props: InterfaceDeletePledgeModal
• deprecatedLegacyContext?: any
Deprecated
See
Returns
ReactNode
The rendered modal component.
The PledgeDeleteModal
component displays a confirmation dialog when a user attempts to delete a pledge.
It allows the user to either confirm or cancel the deletion.
On confirmation, the deletePledge
mutation is called to remove the pledge from the database,
and the refetchPledge
function is invoked to update the list of pledges.
A success or error toast notification is shown based on the result of the deletion operation.
The modal includes:
- A header with a title and a close button.
- A body with a message asking for confirmation.
- A footer with "Yes" and "No" buttons to confirm or cancel the deletion.
The deletePledge
mutation is used to perform the deletion operation.