From 802a7f04eea02c4b3ce61a157c4a2320f624de88 Mon Sep 17 00:00:00 2001 From: "Kalle (Sendou)" <38327916+Sendouc@users.noreply.github.com> Date: Wed, 26 May 2021 21:48:27 +0300 Subject: [PATCH] Add logging to admin page end voting mutation --- pages/admin.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pages/admin.tsx b/pages/admin.tsx index d2a871dad..003009b47 100644 --- a/pages/admin.tsx +++ b/pages/admin.tsx @@ -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;