Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make appeal card use newer entity format
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent e5dc359 commit df1c21f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions components/AppealCard.tsx
Expand Up @@ -23,14 +23,14 @@ import { useEffect, useState } from "react";

export default function (props: AppealCardProps) {
const [dateString, setDateString] = useState(
new Date(props.createdAt).toUTCString()
new Date(props.created_at).toUTCString()
);
const [action, setAction] = useState("");
const [feedback, setFeedback] = useState("");

useEffect(() => {
setDateString(new Date(props.createdAt).toLocaleString());
}, [props.createdAt]);
setDateString(new Date(props.created_at).toLocaleString());
}, [props.created_at]);

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

Expand Down Expand Up @@ -68,7 +68,7 @@ export default function (props: AppealCardProps) {
}

return (
<Card id={`appeal_${props.id}`} w="100%">
<Card id={`appeal_${props.user.id}`} w="100%">
<Modal isOpen={isOpen} onClose={onClose}>
<ModalOverlay />
<ModalContent>
Expand All @@ -91,9 +91,9 @@ export default function (props: AppealCardProps) {
</Modal>
<CardHeader>
<Heading size="md">
Appeal for {props.username}#{props.discriminator}
Appeal for {props.user.username}#{props.user.discriminator}
</Heading>
<Text fontSize="xs">ID: {props.id}</Text>
<Text fontSize="xs">ID: {props.user.id}</Text>
</CardHeader>
<CardBody>
<Stack divider={<StackDivider />}>
Expand Down

0 comments on commit df1c21f

Please sign in to comment.