Fix more ESLint warnings
This commit is contained in:
parent
97a55e843c
commit
f2085c8344
4 changed files with 6 additions and 13 deletions
|
|
@ -9,9 +9,9 @@ interface Props {
|
|||
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void
|
||||
}
|
||||
|
||||
const Fieldset = React.forwardRef<HTMLInputElement, Props>((props, ref) => {
|
||||
const Fieldset = (props: Props) => {
|
||||
const fieldType = (['password', 'confirm_password'].includes(props.fieldName)) ? 'password' : 'text'
|
||||
|
||||
|
||||
return (
|
||||
<fieldset className="Fieldset">
|
||||
<input
|
||||
|
|
@ -31,6 +31,6 @@ const Fieldset = React.forwardRef<HTMLInputElement, Props>((props, ref) => {
|
|||
}
|
||||
</fieldset>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
export default Fieldset
|
||||
|
|
@ -2,9 +2,6 @@ import React, { useEffect, useState } from 'react'
|
|||
|
||||
import './index.scss'
|
||||
|
||||
import mainhandImages from '../../images/weapon-main/*.jpg'
|
||||
import gridImages from '../../images/weapon-grid/*.jpg'
|
||||
|
||||
interface Props {
|
||||
shortcode: string
|
||||
grid: GridWeapon[]
|
||||
|
|
@ -18,10 +15,6 @@ const GridRep = (props: Props) => {
|
|||
const [weapons, setWeapons] = useState<GridArray<Weapon>>({})
|
||||
|
||||
useEffect(() => {
|
||||
configure()
|
||||
}, [])
|
||||
|
||||
function configure() {
|
||||
const newWeapons = Array(numWeapons)
|
||||
|
||||
for (const [key, value] of Object.entries(props.grid)) {
|
||||
|
|
@ -32,7 +25,7 @@ const GridRep = (props: Props) => {
|
|||
}
|
||||
|
||||
setWeapons(newWeapons)
|
||||
}
|
||||
}, [props.grid])
|
||||
|
||||
function navigate() {
|
||||
props.onClick(props.shortcode)
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ const Header = (props: Props) => {
|
|||
setUsername(cookies.user.username)
|
||||
console.log(`Logged in as user "${cookies.user.username}"`)
|
||||
}
|
||||
}, [])
|
||||
}, [cookies])
|
||||
|
||||
function copyToClipboard() {
|
||||
const el = document.createElement('input')
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ const UncapStar = (props: Props) => {
|
|||
})
|
||||
|
||||
return (
|
||||
<li className={classes}><img src="/icons/star.svg" /></li>
|
||||
<li className={classes}><img alt="" src="/icons/star.svg" /></li>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue