no-unused-vars on a host of files

This commit is contained in:
Kent Brockman 2022-07-13 00:51:28 -06:00
parent a9761b0917
commit 79333fc9e1
7 changed files with 24 additions and 39 deletions

View File

@ -316,9 +316,7 @@ export function BioNotesForm(props) {
const history = useHistory(); const history = useHistory();
const handleValues = (e, v) => setInput({ ...input, [v.name]: v.value }); const handleValues = (e, v) => setInput({ ...input, [v.name]: v.value });
const handleUpload = (e, v) => setInput({ ...input, [v.name]: e.target.files[0] });
const handleChange = (e) => handleValues(e, e.currentTarget); const handleChange = (e) => handleValues(e, e.currentTarget);
const handleCheck = (e, v) => setInput({ ...input, [v.name]: v.checked });
const handleSubmit = (e) => { const handleSubmit = (e) => {
if (loading) return; if (loading) return;

View File

@ -1,5 +1,5 @@
import React, { useState, useEffect, useReducer } from 'react'; import React, { useState, useEffect, useReducer } from 'react';
import { Link, useHistory } from 'react-router-dom'; import { Link } from 'react-router-dom';
import './light.css'; import './light.css';
import { Button, Container, Checkbox, Form, Header, Icon, Table } from 'semantic-ui-react'; import { Button, Container, Checkbox, Form, Header, Icon, Table } from 'semantic-ui-react';
import * as Datetime from 'react-datetime'; import * as Datetime from 'react-datetime';
@ -51,7 +51,7 @@ export function AdminVetting(props) {
const { token } = props; const { token } = props;
const [vetting, setVetting] = useState(vettingCache); const [vetting, setVetting] = useState(vettingCache);
const [refreshCount, refreshVetting] = useReducer(x => x + 1, 0); const [refreshCount, refreshVetting] = useReducer(x => x + 1, 0);
const [error, setError] = useState(false); const [error] = useState(false);
const [showAll, setShowAll] = useState(false); const [showAll, setShowAll] = useState(false);
useEffect(() => { useEffect(() => {
@ -121,11 +121,11 @@ export function AdminVetting(props) {
} }
export function AdminHistory(props) { export function AdminHistory(props) {
const { token, user } = props; const { token } = props;
const [history, setHistory] = useState(historyCache); const [history, setHistory] = useState(historyCache);
const [excludeSystem, setExcludeSystem] = useState(excludeSystemCache); const [excludeSystem, setExcludeSystem] = useState(excludeSystemCache);
const [focus, setFocus] = useState(focusCache); const [focus, setFocus] = useState(focusCache);
const [error, setError] = useState(false); const [error] = useState(false);
const handleExcludeSystem = (e, v) => { const handleExcludeSystem = (e, v) => {
setExcludeSystem(v.checked); setExcludeSystem(v.checked);
@ -183,7 +183,7 @@ export function AdminHistory(props) {
<Table.Cell>{x.changes.map(x => x.field).join(', ')}</Table.Cell> <Table.Cell>{x.changes.map(x => x.field).join(', ')}</Table.Cell>
</Table.Row> </Table.Row>
{focus == x.id && {focus === x.id &&
<tr><td colSpan={6}> <tr><td colSpan={6}>
<p>Object ID: {x.object_id}, <a href={apiUrl+x.revert_url} target='_blank'>Database Revert</a></p> <p>Object ID: {x.object_id}, <a href={apiUrl+x.revert_url} target='_blank'>Database Revert</a></p>
{!!x.changes.length && {!!x.changes.length &&
@ -226,7 +226,7 @@ let backupsCache = false;
export function AdminBackups(props) { export function AdminBackups(props) {
const [backups, setBackups] = useState(backupsCache); const [backups, setBackups] = useState(backupsCache);
const [error, setError] = useState(false); const [error] = useState(false);
useEffect(() => { useEffect(() => {
requester('/backup/', 'GET') requester('/backup/', 'GET')
@ -272,10 +272,10 @@ export function AdminBackups(props) {
}; };
export function AdminUsage(props) { export function AdminUsage(props) {
const { token, user } = props; const { token } = props;
const [input, setInput] = useState({ month: moment() }); const [input, setInput] = useState({ month: moment() });
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [error, setError] = useState(false); const [setError] = useState(false);
const handleDatetime = (v) => setInput({ ...input, month: v }); const handleDatetime = (v) => setInput({ ...input, month: v });

View File

@ -1,18 +1,9 @@
import React, { useState, useEffect, useReducer } from 'react'; import React from 'react';
import { BrowserRouter as Router, Switch, Route, Link, useParams, useLocation } from 'react-router-dom'; import { Link } from 'react-router-dom';
import moment from 'moment-timezone';
import QRCode from 'react-qr-code';
import './light.css'; import './light.css';
import { Button, Container, Divider, Dropdown, Form, Grid, Header, Icon, Image, Menu, Message, Popup, Segment, Table } from 'semantic-ui-react'; import { Button, Container, Header } from 'semantic-ui-react';
import { statusColor, BasicTable, siteUrl, staticUrl, requester, isAdmin } from './utils.js';
import { LoginForm, SignupForm } from './LoginSignup.js';
import { AccountForm } from './Account.js';
import { SignForm } from './Sign.js';
import { PayPalSubscribeDeal } from './PayPal.js';
export function Debug(props) { export function Debug(props) {
const { user, token } = props;
return ( return (
<Container> <Container>
<Header size='large'>Debug</Header> <Header size='large'>Debug</Header>

View File

@ -1,8 +1,6 @@
import React, { useState, useEffect, useReducer, useContext } from 'react'; import React from 'react';
import { BrowserRouter as Router, Switch, Route, Link, useParams, useHistory } from 'react-router-dom'; import { Container, Header, Image } from 'semantic-ui-react';
import { Button, Container, Checkbox, Dimmer, Divider, Dropdown, Form, Grid, Header, Icon, Image, Menu, Message, Segment, Table } from 'semantic-ui-react'; import { staticUrl } from './utils.js';
import { apiUrl, statusColor, BasicTable, staticUrl, requester } from './utils.js';
import { NotFound } from './Misc.js';
export function Garden(props) { export function Garden(props) {
return ( return (

View File

@ -1,7 +1,7 @@
import React, { useState, useEffect } from 'react'; import React, { useState } from 'react';
import { BrowserRouter as Router, Switch, Route, Link, useParams, useLocation } from 'react-router-dom'; import { Link } from 'react-router-dom';
import './light.css'; import './light.css';
import { Container, Divider, Dropdown, Form, Grid, Header, Icon, Image, Menu, Message, Segment, Table } from 'semantic-ui-react'; import { Form, Header, Message } from 'semantic-ui-react';
import { requester, randomString } from './utils.js'; import { requester, randomString } from './utils.js';
export function LoginForm(props) { export function LoginForm(props) {
@ -69,7 +69,6 @@ export function SignupForm(props) {
const [error, setError] = useState({}); const [error, setError] = useState({});
const [progress, setProgress] = useState([]); const [progress, setProgress] = useState([]);
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const location = useLocation();
const handleValues = (e, v) => setInput({ ...input, [v.name]: v.value }); const handleValues = (e, v) => setInput({ ...input, [v.name]: v.value });
const handleChange = (e) => handleValues(e, e.currentTarget); const handleChange = (e) => handleValues(e, e.currentTarget);

View File

@ -1,7 +1,7 @@
import React, { useState, useEffect } from 'react'; import React from 'react';
import { BrowserRouter as Router, Switch, Route, Link, useParams } from 'react-router-dom'; import { Link } from 'react-router-dom';
import './light.css'; import './light.css';
import { Container, Divider, Dropdown, Form, Grid, Header, Icon, Image, Menu, Message, Segment, Table } from 'semantic-ui-react'; import { Container, Message } from 'semantic-ui-react';
export function PleaseLogin() { export function PleaseLogin() {
return ( return (

View File

@ -1,10 +1,9 @@
import React, { useState, useEffect } from 'react'; import React from 'react';
import { BrowserRouter as Router, Switch, Route, Link, useParams } from 'react-router-dom'; import { Link } from 'react-router-dom';
import './light.css'; import './light.css';
import { Container, Divider, Dropdown, Form, Grid, Header, Icon, Image, Menu, Message, Popup, Segment, Table } from 'semantic-ui-react'; import { Container, Header, Popup, Table } from 'semantic-ui-react';
import moment from 'moment-timezone'; import moment from 'moment-timezone';
import { requester, getInstructor } from './utils.js'; import { getInstructor } from './utils.js';
import { NotFound, PleaseLogin } from './Misc.js';
export function CertList(props) { export function CertList(props) {
const { member } = props; const { member } = props;