From 36310a727afb5ff8c1cb269fc2151e9e27d3251c Mon Sep 17 00:00:00 2001 From: regalijan Date: Thu, 19 Oct 2023 16:51:01 -0400 Subject: [PATCH] Reload on actions --- components/AppealCard.tsx | 1 + components/GameAppealCard.tsx | 2 ++ components/ReportCard.tsx | 1 + 3 files changed, 4 insertions(+) diff --git a/components/AppealCard.tsx b/components/AppealCard.tsx index f7d10ef..164f7da 100644 --- a/components/AppealCard.tsx +++ b/components/AppealCard.tsx @@ -73,6 +73,7 @@ export default function (props: AppealCardProps) { onClose(); setLoading(false); + location.reload(); } return ( diff --git a/components/GameAppealCard.tsx b/components/GameAppealCard.tsx index a30759b..4ea3188 100644 --- a/components/GameAppealCard.tsx +++ b/components/GameAppealCard.tsx @@ -22,6 +22,7 @@ import { useState } from "react"; export default function (props: GameAppealProps) { const [loading, setLoading] = useState(false); + async function performAction(action: "accept" | "deny"): Promise { setLoading(true); const statsReduction = parseInt( @@ -56,6 +57,7 @@ export default function (props: GameAppealProps) { ); setLoading(false); + location.reload(); } const { isOpen, onClose, onOpen } = useDisclosure(); diff --git a/components/ReportCard.tsx b/components/ReportCard.tsx index b3a15e0..58e3afc 100644 --- a/components/ReportCard.tsx +++ b/components/ReportCard.tsx @@ -70,6 +70,7 @@ export default function (props: ReportCardProps) { title: "Success", }); setLoading(false); + location.reload(); } return (