Close reduction modal on submit

This commit is contained in:
Regalijan 2023-11-01 10:32:19 -04:00
parent e40eb9ecfc
commit 6f2bb0ebd1
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -23,6 +23,7 @@ import { useState } from "react";
export default function (props: GameAppealProps & { port?: MessagePort }) { export default function (props: GameAppealProps & { port?: MessagePort }) {
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [percentage, setPercentage] = useState(0); const [percentage, setPercentage] = useState(0);
const { isOpen, onClose, onOpen } = useDisclosure();
const toast = useToast(); const toast = useToast();
async function performAction(action: "accept" | "deny"): Promise<void> { async function performAction(action: "accept" | "deny"): Promise<void> {
@ -59,11 +60,10 @@ export default function (props: GameAppealProps & { port?: MessagePort }) {
); );
setLoading(false); setLoading(false);
onClose();
props.port?.postMessage(`gma_${props.id}`); props.port?.postMessage(`gma_${props.id}`);
} }
const { isOpen, onClose, onOpen } = useDisclosure();
return ( return (
<Card <Card
id={`gma_${props.roblox_id}${props.created_at}`} id={`gma_${props.roblox_id}${props.created_at}`}