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
|
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'
|
const fieldType = (['password', 'confirm_password'].includes(props.fieldName)) ? 'password' : 'text'
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<fieldset className="Fieldset">
|
<fieldset className="Fieldset">
|
||||||
<input
|
<input
|
||||||
|
|
@ -31,6 +31,6 @@ const Fieldset = React.forwardRef<HTMLInputElement, Props>((props, ref) => {
|
||||||
}
|
}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
)
|
)
|
||||||
})
|
}
|
||||||
|
|
||||||
export default Fieldset
|
export default Fieldset
|
||||||
|
|
@ -2,9 +2,6 @@ import React, { useEffect, useState } from 'react'
|
||||||
|
|
||||||
import './index.scss'
|
import './index.scss'
|
||||||
|
|
||||||
import mainhandImages from '../../images/weapon-main/*.jpg'
|
|
||||||
import gridImages from '../../images/weapon-grid/*.jpg'
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
shortcode: string
|
shortcode: string
|
||||||
grid: GridWeapon[]
|
grid: GridWeapon[]
|
||||||
|
|
@ -18,10 +15,6 @@ const GridRep = (props: Props) => {
|
||||||
const [weapons, setWeapons] = useState<GridArray<Weapon>>({})
|
const [weapons, setWeapons] = useState<GridArray<Weapon>>({})
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
configure()
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
function configure() {
|
|
||||||
const newWeapons = Array(numWeapons)
|
const newWeapons = Array(numWeapons)
|
||||||
|
|
||||||
for (const [key, value] of Object.entries(props.grid)) {
|
for (const [key, value] of Object.entries(props.grid)) {
|
||||||
|
|
@ -32,7 +25,7 @@ const GridRep = (props: Props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
setWeapons(newWeapons)
|
setWeapons(newWeapons)
|
||||||
}
|
}, [props.grid])
|
||||||
|
|
||||||
function navigate() {
|
function navigate() {
|
||||||
props.onClick(props.shortcode)
|
props.onClick(props.shortcode)
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ const Header = (props: Props) => {
|
||||||
setUsername(cookies.user.username)
|
setUsername(cookies.user.username)
|
||||||
console.log(`Logged in as user "${cookies.user.username}"`)
|
console.log(`Logged in as user "${cookies.user.username}"`)
|
||||||
}
|
}
|
||||||
}, [])
|
}, [cookies])
|
||||||
|
|
||||||
function copyToClipboard() {
|
function copyToClipboard() {
|
||||||
const el = document.createElement('input')
|
const el = document.createElement('input')
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ const UncapStar = (props: Props) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
return (
|
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