Le formatting fixes
This commit is contained in:
@ -42,7 +42,7 @@ export default function () {
|
||||
const [supportsRequestStreams, setSupportsRequestStreams] = useState(false);
|
||||
const toast = useToast();
|
||||
const [uploading, setUploading] = useState(false);
|
||||
const [loading, setLoading] = useState(false)
|
||||
const [loading, setLoading] = useState(false);
|
||||
const fileTypes: { [k: string]: string } = {
|
||||
gif: "image/gif",
|
||||
m4v: "video/x-m4v",
|
||||
@ -76,7 +76,7 @@ export default function () {
|
||||
const { logged_in, site_key } = useLoaderData<typeof loader>();
|
||||
|
||||
async function submit() {
|
||||
setLoading(true)
|
||||
setLoading(true);
|
||||
const usernames = (
|
||||
document.getElementById("usernames") as HTMLInputElement
|
||||
).value
|
||||
@ -86,7 +86,7 @@ export default function () {
|
||||
.files;
|
||||
|
||||
if (!usernames.length) {
|
||||
setLoading(false)
|
||||
setLoading(false);
|
||||
return toast({
|
||||
description: "Must provide at least one username",
|
||||
isClosable: true,
|
||||
@ -96,7 +96,7 @@ export default function () {
|
||||
}
|
||||
|
||||
if (!files?.length) {
|
||||
setLoading(false)
|
||||
setLoading(false);
|
||||
return toast({
|
||||
description: "Must attach at least one file",
|
||||
isClosable: true,
|
||||
@ -106,7 +106,7 @@ export default function () {
|
||||
}
|
||||
|
||||
if (usernames.length > 20) {
|
||||
setLoading(false)
|
||||
setLoading(false);
|
||||
return toast({
|
||||
description: "Only up to twenty users can be reported at a time",
|
||||
isClosable: true,
|
||||
@ -123,7 +123,7 @@ export default function () {
|
||||
.item(0) as HTMLInputElement;
|
||||
|
||||
if (!tokenElem.value) {
|
||||
setLoading(false)
|
||||
setLoading(false);
|
||||
return toast({
|
||||
description: "Please complete the captcha and try again",
|
||||
isClosable: true,
|
||||
@ -160,7 +160,7 @@ export default function () {
|
||||
});
|
||||
|
||||
if (!submitReq.ok) {
|
||||
setLoading(false)
|
||||
setLoading(false);
|
||||
if (!logged_in) {
|
||||
try {
|
||||
// @ts-expect-error
|
||||
@ -235,7 +235,7 @@ export default function () {
|
||||
}
|
||||
|
||||
if (shouldRecall) {
|
||||
setLoading(false)
|
||||
setLoading(false);
|
||||
await fetch("/api/reports/recall", {
|
||||
body: JSON.stringify({ id }),
|
||||
headers: {
|
||||
@ -264,7 +264,7 @@ export default function () {
|
||||
});
|
||||
|
||||
setShowSuccess(true);
|
||||
setLoading(false)
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
@ -332,7 +332,7 @@ export default function () {
|
||||
disabled={uploading}
|
||||
mr="8px"
|
||||
onClick={async () => await submit()}
|
||||
loadingText='Submitting'
|
||||
loadingText="Submitting"
|
||||
isLoading={loading}
|
||||
>
|
||||
Submit
|
||||
|
Reference in New Issue
Block a user