Reload on actions

This commit is contained in:
regalijan 2023-10-19 16:51:01 -04:00
parent 486762cc3d
commit 36310a727a
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520
3 changed files with 4 additions and 0 deletions

View File

@ -73,6 +73,7 @@ export default function (props: AppealCardProps) {
onClose(); onClose();
setLoading(false); setLoading(false);
location.reload();
} }
return ( return (

View File

@ -22,6 +22,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);
async function performAction(action: "accept" | "deny"): Promise<void> { async function performAction(action: "accept" | "deny"): Promise<void> {
setLoading(true); setLoading(true);
const statsReduction = parseInt( const statsReduction = parseInt(
@ -56,6 +57,7 @@ export default function (props: GameAppealProps) {
); );
setLoading(false); setLoading(false);
location.reload();
} }
const { isOpen, onClose, onOpen } = useDisclosure(); const { isOpen, onClose, onOpen } = useDisclosure();

View File

@ -70,6 +70,7 @@ export default function (props: ReportCardProps) {
title: "Success", title: "Success",
}); });
setLoading(false); setLoading(false);
location.reload();
} }
return ( return (