diff --git a/components/AppealCard.tsx b/components/AppealCard.tsx index aba2529..45e20ba 100644 --- a/components/AppealCard.tsx +++ b/components/AppealCard.tsx @@ -17,13 +17,13 @@ import { Text, Textarea, useDisclosure, - useToast, + useToast } from "@chakra-ui/react"; import { useEffect, useState } from "react"; -export default function (props: AppealCardProps) { +export default function(props: AppealCardProps) { const [dateString, setDateString] = useState( - new Date(props.created_at).toUTCString(), + new Date(props.created_at).toUTCString() ); const [action, setAction] = useState(""); const [feedback, setFeedback] = useState(""); @@ -46,9 +46,9 @@ export default function (props: AppealCardProps) { const actionReq = await fetch(`/api/appeals/${props.id}/${action}`, { body: feedback ? JSON.stringify({ feedback }) : "{}", headers: { - "content-type": "application/json", + "content-type": "application/json" }, - method: "POST", + method: "POST" }); if (actionReq.ok) { @@ -57,7 +57,7 @@ export default function (props: AppealCardProps) { description: `Appeal ${action === "accept" ? "accepted" : "denied"}`, duration: 5000, status: "success", - title: "Success", + title: "Success" }); document.getElementById(`appeal_${props.id}`)?.remove(); @@ -74,7 +74,7 @@ export default function (props: AppealCardProps) { description: error, duration: 10000, status: "error", - title: "Oops!", + title: "Oops!" }); } @@ -130,7 +130,7 @@ export default function (props: AppealCardProps) { - + diff --git a/components/InactivityNoticeCard.tsx b/components/InactivityNoticeCard.tsx index 79c4c29..5f9d3f7 100644 --- a/components/InactivityNoticeCard.tsx +++ b/components/InactivityNoticeCard.tsx @@ -11,11 +11,11 @@ import { StackDivider, Text, UnorderedList, - useToast, + useToast } from "@chakra-ui/react"; import { useState } from "react"; -export default function (props: InactivityNoticeProps) { +export default function(props: InactivityNoticeProps) { const toast = useToast(); const [loading, setLoading] = useState(false); @@ -24,9 +24,9 @@ export default function (props: InactivityNoticeProps) { const decisionReq = await fetch(`/api/inactivity/${props.id}`, { body: JSON.stringify({ accepted }), headers: { - "content-type": "application/json", + "content-type": "application/json" }, - method: "POST", + method: "POST" }); if (!decisionReq.ok) { @@ -35,7 +35,7 @@ export default function (props: InactivityNoticeProps) { description: ((await decisionReq.json()) as { error: string }).error, isClosable: true, status: "error", - title: "Oops", + title: "Oops" }); return; @@ -45,7 +45,7 @@ export default function (props: InactivityNoticeProps) { description: `Inactivity notice ${accepted ? "accepted" : "denied"}.`, isClosable: true, status: "success", - title: "Success", + title: "Success" }); setLoading(false); @@ -54,13 +54,15 @@ export default function (props: InactivityNoticeProps) { const Approved = () => ( - + ); const Denied = () => ( - + ); @@ -101,7 +103,7 @@ export default function (props: InactivityNoticeProps) { ) : null} - +