Le formatting fixes
This commit is contained in:
@ -18,7 +18,7 @@ import { useState } from "react";
|
||||
|
||||
export default function (props: ReportCardProps) {
|
||||
const [attachmentIdx, setAttachmentIdx] = useState(0);
|
||||
const [loading, setLoading] = useState(false)
|
||||
const [loading, setLoading] = useState(false);
|
||||
const toast = useToast();
|
||||
const targetMap: { [k: number]: string } = {};
|
||||
const [attachmentsReady, setAttachmentReady] = useState(
|
||||
@ -44,7 +44,7 @@ export default function (props: ReportCardProps) {
|
||||
}
|
||||
|
||||
async function submitActions() {
|
||||
setLoading(true)
|
||||
setLoading(true);
|
||||
const submitReq = await fetch(`/api/reports/${props.id}/action`, {
|
||||
body: JSON.stringify(actionMap),
|
||||
headers: {
|
||||
@ -54,7 +54,7 @@ export default function (props: ReportCardProps) {
|
||||
});
|
||||
|
||||
if (!submitReq.ok) {
|
||||
setLoading(false)
|
||||
setLoading(false);
|
||||
toast({
|
||||
description: ((await submitReq.json()) as { error: string }).error,
|
||||
status: "error",
|
||||
@ -69,7 +69,7 @@ export default function (props: ReportCardProps) {
|
||||
status: "success",
|
||||
title: "Success",
|
||||
});
|
||||
setLoading(false)
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
return (
|
||||
@ -192,7 +192,7 @@ export default function (props: ReportCardProps) {
|
||||
colorScheme="blue"
|
||||
onClick={async () => await submitActions()}
|
||||
isLoading={loading}
|
||||
loadingText='Submitting...'
|
||||
loadingText="Submitting..."
|
||||
>
|
||||
Submit
|
||||
</Button>
|
||||
|
Reference in New Issue
Block a user