Fix lint error: Forgot SearchableObject
This commit is contained in:
parent
32e3bbdab4
commit
d32824521b
1 changed files with 35 additions and 35 deletions
|
|
@ -1,46 +1,46 @@
|
||||||
import React from 'react'
|
import React from "react"
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from "next-i18next"
|
||||||
import WeaponUnit from '~components/WeaponUnit'
|
import WeaponUnit from "~components/WeaponUnit"
|
||||||
|
|
||||||
import './index.scss'
|
import type { SearchableObject } from "~types"
|
||||||
|
|
||||||
|
import "./index.scss"
|
||||||
|
|
||||||
// Props
|
// Props
|
||||||
interface Props {
|
interface Props {
|
||||||
grid: GridArray<GridWeapon>
|
grid: GridArray<GridWeapon>
|
||||||
editable: boolean
|
editable: boolean
|
||||||
found?: boolean
|
found?: boolean
|
||||||
offset: number
|
offset: number
|
||||||
updateObject: (object: Character | Weapon | Summon, position: number) => void
|
updateObject: (object: SearchableObject, position: number) => void
|
||||||
updateUncap: (id: string, position: number, uncap: number) => void
|
updateUncap: (id: string, position: number, uncap: number) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
const ExtraWeapons = (props: Props) => {
|
const ExtraWeapons = (props: Props) => {
|
||||||
const numWeapons: number = 3
|
const numWeapons: number = 3
|
||||||
const { t } = useTranslation('common')
|
const { t } = useTranslation("common")
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div id="ExtraGrid">
|
<div id="ExtraGrid">
|
||||||
<span>{t('extra_weapons')}</span>
|
<span>{t("extra_weapons")}</span>
|
||||||
<ul className="grid_weapons">
|
<ul className="grid_weapons">
|
||||||
{
|
{Array.from(Array(numWeapons)).map((x, i) => {
|
||||||
Array.from(Array(numWeapons)).map((x, i) => {
|
return (
|
||||||
return (
|
<li key={`grid_unit_${i}`}>
|
||||||
<li key={`grid_unit_${i}`} >
|
<WeaponUnit
|
||||||
<WeaponUnit
|
editable={props.editable}
|
||||||
editable={props.editable}
|
position={props.offset + i}
|
||||||
position={props.offset + i}
|
unitType={1}
|
||||||
unitType={1}
|
gridWeapon={props.grid[props.offset + i]}
|
||||||
gridWeapon={props.grid[props.offset + i]}
|
updateObject={props.updateObject}
|
||||||
updateObject={props.updateObject}
|
updateUncap={props.updateUncap}
|
||||||
updateUncap={props.updateUncap}
|
/>
|
||||||
/>
|
</li>
|
||||||
</li>
|
)
|
||||||
)
|
})}
|
||||||
})
|
</ul>
|
||||||
}
|
</div>
|
||||||
</ul>
|
)
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ExtraWeapons
|
export default ExtraWeapons
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue