refactor: centralize confirm and prompt dialog calls in frontend
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user