Trial self deletion for item cards

This commit is contained in:
regalijan 2023-10-19 16:51:07 -04:00
parent 722a791000
commit 8b1e44fa91
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520
2 changed files with 10 additions and 4 deletions

View File

@ -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>

View File

@ -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>