Lint all the things

This commit is contained in:
Dave
2025-08-19 16:23:29 -04:00
parent f6d6b548be
commit 33fb60ca1a
640 changed files with 2129 additions and 3927 deletions

View File

@@ -1,4 +1,4 @@
import React, { useCallback, useEffect, useRef, useState } from "react";
import { useCallback, useEffect, useRef, useState } from "react";
import { Button, Card, Checkbox, Col, Form, Input, Modal, Row } from "antd";
import Markdown from "react-markdown";
import { createStructuredSelector } from "reselect";
@@ -50,12 +50,12 @@ const Eula = ({ currentEula, currentUser, acceptEula }) => {
handleChange();
}, [handleChange, hasEverScrolledToBottom, form]);
const onFinish = async ({ acceptTerms, ...formValues }) => {
const onFinish = async ({ ...formValues }) => {
const eulaId = currentEula.id;
const useremail = currentUser.email;
try {
const { accepted_terms, ...otherFormValues } = formValues;
const { ...otherFormValues } = formValues;
// Trim the values of the fields before submitting
const trimmedFormValues = Object.entries(otherFormValues).reduce((acc, [key, value]) => {
@@ -89,40 +89,38 @@ const Eula = ({ currentEula, currentUser, acceptEula }) => {
};
return (
<>
<Modal
title={t("eula.titles.modal")}
className="eula-modal"
width={"100vh"}
open={currentEula}
footer={() => (
<Button
className="eula-accept-button"
form="tosForm"
type="primary"
size="large"
htmlType="submit"
disabled={!formReady}
children={t("eula.buttons.accept")}
/>
)}
closable={false}
>
<Card type="inner" className="eula-markdown-card" onScroll={handleScroll} ref={markdownCardRef}>
<div id="markdowndiv" className="eula-markdown-div">
<Markdown children={currentEula?.content?.replace(/\\n|\\r|\\n\\r|\\r\\n/g, "\n")} />
</div>
<Modal
title={t("eula.titles.modal")}
className="eula-modal"
width={"100vh"}
open={currentEula}
footer={() => (
<Button
className="eula-accept-button"
form="tosForm"
type="primary"
size="large"
htmlType="submit"
disabled={!formReady}
children={t("eula.buttons.accept")}
/>
)}
closable={false}
>
<Card type="inner" className="eula-markdown-card" onScroll={handleScroll} ref={markdownCardRef}>
<div id="markdowndiv" className="eula-markdown-div">
<Markdown children={currentEula?.content?.replace(/\\n|\\r|\\n\\r|\\r\\n/g, "\n")} />
</div>
</Card>
<EulaFormComponent form={form} handleChange={handleChange} onFinish={onFinish} t={t} />
{!hasEverScrolledToBottom && (
<Card className="eula-never-scrolled" type="inner">
<h3>{t("eula.content.never_scrolled")}</h3>
</Card>
<EulaFormComponent form={form} handleChange={handleChange} onFinish={onFinish} t={t} />
{!hasEverScrolledToBottom && (
<Card className="eula-never-scrolled" type="inner">
<h3>{t("eula.content.never_scrolled")}</h3>
</Card>
)}
</Modal>
</>
)}
</Modal>
);
};