From e2c98ccfae5e7f266d3b6401b0662a824d7ba431 Mon Sep 17 00:00:00 2001 From: regalijan Date: Fri, 20 Oct 2023 12:54:39 -0400 Subject: [PATCH] Fix toast hook issue --- components/GameAppealCard.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/GameAppealCard.tsx b/components/GameAppealCard.tsx index c2e806c..72e0360 100644 --- a/components/GameAppealCard.tsx +++ b/components/GameAppealCard.tsx @@ -23,6 +23,7 @@ import { useState } from "react"; export default function (props: GameAppealProps) { const [loading, setLoading] = useState(false); const [percentage, setPercentage] = useState(0); + const toast = useToast(); async function performAction(action: "accept" | "deny"): Promise { setLoading(true); @@ -40,7 +41,7 @@ export default function (props: GameAppealProps) { }, ); - useToast()( + toast( actionResponse.ok ? { duration: 5000,