Fix toast hook issue

This commit is contained in:
regalijan 2023-10-20 12:54:39 -04:00
parent c609ab4e0e
commit e2c98ccfae
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -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<void> {
setLoading(true);
@ -40,7 +41,7 @@ export default function (props: GameAppealProps) {
},
);
useToast()(
toast(
actionResponse.ok
? {
duration: 5000,