Skip to content

Commit

Permalink
Merge pull request #51 from ITPNYU/feature/admin_remove
Browse files Browse the repository at this point in the history
Reload data when removed
  • Loading branch information
rlho authored Nov 6, 2023
2 parents 8fe88a8 + 729a876 commit 231d97a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const AdminUsers = () => {
]);

alert('User has been registered successfully!');
window.location.reload();
fetchAdminUsers();
};
return (
<div className="m-10">
Expand Down Expand Up @@ -130,7 +130,7 @@ export const AdminUsers = () => {
adminUser.email
);
alert('Successfully removed');
window.location.reload();
fetchAdminUsers();
}}
>
Remove
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const Ban = () => {
serverFunctions.appendRow(BAN_SHEET_NAME, [email, new Date().toString()]);

alert('User has been registered successfully!');
window.location.reload();
fetchBans();
};
return (
<div className="m-10">
Expand Down Expand Up @@ -127,7 +127,7 @@ export const Ban = () => {
ban.email
);
alert('Successfully removed');
window.location.reload();
fetchBans();
}}
>
Remove
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const Liaisons = () => {
]);

alert('User has been registered successfully!');
window.location.reload();
fetchLiaisonUsers();
};
return (
<div className="m-10">
Expand Down Expand Up @@ -166,7 +166,7 @@ export const Liaisons = () => {
liaison.email
);
alert('Successfully removed');
window.location.reload();
fetchLiaisonUsers();
}}
>
Remove
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const SafetyTraining = () => {
]);

alert('User has been registered successfully!');
window.location.reload();
fetchSafetyTrainings();
};
return (
<div className="m-10">
Expand Down Expand Up @@ -131,7 +131,7 @@ export const SafetyTraining = () => {
safetyTraining.email
);
alert('Successfully removed');
window.location.reload();
fetchSafetyTrainings();
}}
>
Remove
Expand Down

0 comments on commit 231d97a

Please sign in to comment.