Fix lint error: Forgot SearchableObject

This commit is contained in:
Justin Edmund 2022-12-03 19:21:44 -08:00
parent 32e3bbdab4
commit d32824521b

View file

@ -1,8 +1,10 @@
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 {
@ -10,20 +12,19 @@ interface Props {
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
@ -36,8 +37,7 @@ const ExtraWeapons = (props: Props) => {
/> />
</li> </li>
) )
}) })}
}
</ul> </ul>
</div> </div>
) )