Le formatting fixes

This commit is contained in:
2023-10-19 16:50:58 -04:00
parent 0a4ad7792d
commit 3155442796
11 changed files with 119 additions and 125 deletions

View File

@ -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