Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Create AppealCard component
- Loading branch information
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { | ||
Box, | ||
Card, | ||
CardBody, | ||
CardFooter, | ||
CardHeader, | ||
Heading, | ||
Stack, | ||
StackDivider, | ||
Text, | ||
} from "@chakra-ui/react"; | ||
|
||
export default function (props: { | ||
ban_reason: string; | ||
createdAt: number; | ||
discriminator: string; | ||
id: string; | ||
learned: string; | ||
reason_for_unban: string; | ||
username: string; | ||
}) { | ||
return ( | ||
<> | ||
<Card> | ||
<CardHeader> | ||
<Heading size="md"> | ||
Appeal for {props.username}#{props.discriminator} | ||
</Heading> | ||
</CardHeader> | ||
<CardBody> | ||
<Stack divider={<StackDivider />}> | ||
<Box> | ||
<Heading size="xs">Response: Why were you banned?</Heading> | ||
<Text>{props.ban_reason}</Text> | ||
</Box> | ||
<Box> | ||
<Heading size="xs">Response: Why should we unban you?</Heading> | ||
<Text>{props.reason_for_unban}</Text> | ||
</Box> | ||
<Box> | ||
<Heading size="xs"> | ||
Response: What have you learned from your mistake? | ||
</Heading> | ||
<Text>{props.learned}</Text> | ||
</Box> | ||
</Stack> | ||
</CardBody> | ||
<CardFooter> | ||
<Text fontSize="xs"> | ||
Submitted at: {new Date(props.createdAt).toLocaleString()} | ||
</Text> | ||
</CardFooter> | ||
</Card> | ||
</> | ||
); | ||
} |