Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Reload on actions
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent 486762c commit 36310a7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions components/AppealCard.tsx
Expand Up @@ -73,6 +73,7 @@ export default function (props: AppealCardProps) {

onClose();
setLoading(false);
location.reload();
}

return (
Expand Down
2 changes: 2 additions & 0 deletions components/GameAppealCard.tsx
Expand Up @@ -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<void> {
setLoading(true);
const statsReduction = parseInt(
Expand Down Expand Up @@ -56,6 +57,7 @@ export default function (props: GameAppealProps) {
);

setLoading(false);
location.reload();
}

const { isOpen, onClose, onOpen } = useDisclosure();
Expand Down
1 change: 1 addition & 0 deletions components/ReportCard.tsx
Expand Up @@ -70,6 +70,7 @@ export default function (props: ReportCardProps) {
title: "Success",
});
setLoading(false);
location.reload();
}

return (
Expand Down

0 comments on commit 36310a7

Please sign in to comment.