Le formatting fixes
This commit is contained in:
@ -64,11 +64,11 @@ export default function () {
|
||||
const pageProps = useLoaderData<typeof loader>();
|
||||
const { isOpen, onClose, onOpen } = useDisclosure();
|
||||
const [showSuccess, setShowSuccess] = useState(false);
|
||||
const [loading, setLoading] = useState(false)
|
||||
const [loading, setLoading] = useState(false);
|
||||
const toast = useToast();
|
||||
|
||||
async function submit() {
|
||||
setLoading(true)
|
||||
setLoading(true);
|
||||
const learned = (document.getElementById("learned") as HTMLInputElement)
|
||||
.value;
|
||||
const whyBanned = (document.getElementById("whyBanned") as HTMLInputElement)
|
||||
@ -89,7 +89,7 @@ export default function () {
|
||||
}).catch(() => {});
|
||||
|
||||
if (!submitReq) {
|
||||
setLoading(false)
|
||||
setLoading(false);
|
||||
return toast({
|
||||
description: "Please check your internet and try again",
|
||||
duration: 10000,
|
||||
@ -100,7 +100,7 @@ export default function () {
|
||||
}
|
||||
|
||||
if (!submitReq.ok) {
|
||||
setLoading(false)
|
||||
setLoading(false);
|
||||
return toast({
|
||||
description: ((await submitReq.json()) as { error: string }).error,
|
||||
duration: 10000,
|
||||
@ -111,7 +111,7 @@ export default function () {
|
||||
}
|
||||
|
||||
setShowSuccess(true);
|
||||
setLoading(false)
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
async function toggle(active: boolean) {
|
||||
@ -239,7 +239,7 @@ export default function () {
|
||||
<Button
|
||||
disabled={pageProps.can_appeal}
|
||||
onClick={async () => await submit()}
|
||||
loadingText='Submitting'
|
||||
loadingText="Submitting"
|
||||
isLoading={loading}
|
||||
>
|
||||
Submit
|
||||
|
@ -13,7 +13,7 @@ import { useState } from "react";
|
||||
|
||||
export default function () {
|
||||
const [showCookieBox, setShowCookieBox] = useState(false);
|
||||
const [loading, setLoading] = useState(false)
|
||||
const [loading, setLoading] = useState(false);
|
||||
return (
|
||||
<Container maxW="container.md">
|
||||
<Heading pt="36px">Let's get started</Heading>
|
||||
@ -32,7 +32,7 @@ export default function () {
|
||||
/>
|
||||
<Button
|
||||
onClick={async () => {
|
||||
setLoading(true)
|
||||
setLoading(true);
|
||||
const createTransferReq = await fetch("/api/data-transfers/create", {
|
||||
body: JSON.stringify({
|
||||
can_access: !showCookieBox,
|
||||
@ -47,7 +47,7 @@ export default function () {
|
||||
});
|
||||
|
||||
if (!createTransferReq.ok) {
|
||||
setLoading(false)
|
||||
setLoading(false);
|
||||
useToast()({
|
||||
description: (
|
||||
(await createTransferReq.json()) as { error: string }
|
||||
@ -66,7 +66,7 @@ export default function () {
|
||||
}}
|
||||
pt="32px"
|
||||
isLoading={loading}
|
||||
loadingText='Processing...'
|
||||
loadingText="Processing..."
|
||||
>
|
||||
Continue
|
||||
</Button>
|
||||
|
@ -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