Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Trial self deletion for item cards
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent 722a791 commit 8b1e44f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions components/AppealCard.tsx
Expand Up @@ -73,11 +73,11 @@ export default function (props: AppealCardProps) {

onClose();
setLoading(false);
location.reload();
document.getElementById(`appeal_${props.id}`)?.remove();
}

return (
<Card id={`appeal_${props.user.id}`} key={props.id} w="100%">
<Card id={`appeal_${props.id}`} key={props.id} w="100%">
<Modal isOpen={isOpen} onClose={onClose}>
<ModalOverlay />
<ModalContent>
Expand Down
10 changes: 8 additions & 2 deletions components/GameAppealCard.tsx
Expand Up @@ -57,13 +57,19 @@ export default function (props: GameAppealProps) {
);

setLoading(false);
location.reload();
document
.getElementById(`gma_${props.roblox_id}${props.created_at}`)
?.remove();
}

const { isOpen, onClose, onOpen } = useDisclosure();

return (
<Card key={props.roblox_id} w="100%">
<Card
id={`gma_${props.roblox_id}${props.created_at}`}
key={props.roblox_id}
w="100%"
>
<CardHeader>
<Heading size="md">Game Ban Appeal for {props.roblox_username}</Heading>
<Text fontSize="xs">ID: {props.roblox_id}</Text>
Expand Down

0 comments on commit 8b1e44f

Please sign in to comment.