Fix toast hook issue
This commit is contained in:
parent
c609ab4e0e
commit
e2c98ccfae
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user