Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/120 admin volunteers docs #182

Merged
merged 17 commits into from
Apr 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/components/PersonCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ function PersonCard({ person, personType, kids, request = false, trash = true })
autoClose: 5000
})
}
setTimeout(() => {
window.location.reload();
}, 2000);
}

const handleRechazar = async (person) => {
Expand All @@ -86,11 +88,13 @@ function PersonCard({ person, personType, kids, request = false, trash = true })
autoClose: 5000
});
} else {
toast.success("Usuario actualizado con éxito.", {
toast.success("Usuario rechazado con éxito.", {
autoClose: 5000
})
}
window.location.reload();
setTimeout(() => {
window.location.reload();
}, 2000);
}

const handleEliminar = async (person) => {
Expand All @@ -111,7 +115,9 @@ function PersonCard({ person, personType, kids, request = false, trash = true })
toast.success("Persona eliminada correctamente", {
autoClose: 5000
})
window.location.reload(); // Recarga la ventana después de eliminar
setTimeout(() => {
window.location.reload();
}, 2000);
}
}
const roleAvatarMap = {
Expand Down