refactor: centralize confirm and prompt dialog calls in frontend

This commit is contained in:
cesnimda
2026-03-22 14:08:30 +01:00
parent c296e26b6c
commit 0863728eab
5 changed files with 18 additions and 4 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ export default function AdminUsersPage() {
};
const remove = async (u: UserDto) => {
if (!window.confirm(`Delete user ${u.email || u.userName || u.id}?`)) return;
if (!confirmAction(`Delete user ${u.email || u.userName || u.id}?`)) return;
try {
await api.delete(`/users/${u.id}`);
toast("User deleted.", "info");