Add logging to admin page end voting mutation

This commit is contained in:
Kalle (Sendou)
2021-05-26 21:48:27 +03:00
parent 255b58b6c7
commit 802a7f04ee

View File

@@ -15,7 +15,10 @@ const AdminPage = () => {
switchAccountId: "",
discordId: "",
});
const endVoting = trpc.useMutation("plus.endVoting");
const endVoting = trpc.useMutation("plus.endVoting", {
onSuccess: () => console.log("success"),
onError: (e) => console.error(e.message),
});
const handleEndVoting = () => {
if (!window.confirm("End voting?")) return;