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) {
|
export default function (props: GameAppealProps) {
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [percentage, setPercentage] = useState(0);
|
const [percentage, setPercentage] = useState(0);
|
||||||
|
const toast = useToast();
|
||||||
|
|
||||||
async function performAction(action: "accept" | "deny"): Promise<void> {
|
async function performAction(action: "accept" | "deny"): Promise<void> {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
@ -40,7 +41,7 @@ export default function (props: GameAppealProps) {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
useToast()(
|
toast(
|
||||||
actionResponse.ok
|
actionResponse.ok
|
||||||
? {
|
? {
|
||||||
duration: 5000,
|
duration: 5000,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user