Fix type for weapon image source
This commit is contained in:
parent
35360600fb
commit
772713e15a
1 changed files with 7 additions and 1 deletions
|
|
@ -10,10 +10,16 @@ import './WeaponGridUnit.css'
|
|||
function WeaponGridUnit(props: WeaponGridProps) {
|
||||
const { open, openModal, closeModal } = useModal()
|
||||
|
||||
let imgSrc = ''
|
||||
if (props.weapon) {
|
||||
const weapon = props.weapon!
|
||||
imgSrc = gridImages[weapon.granblue_id]
|
||||
}
|
||||
|
||||
return (
|
||||
<li>
|
||||
<div className="WeaponGridUnit" onClick={openModal}>
|
||||
<img className="grid_image" src={gridImages[props.weapon?.granblue_id]} />
|
||||
<img className="grid_image" src={imgSrc} />
|
||||
<span className='icon'><Plus /></span>
|
||||
</div>
|
||||
{open ? (
|
||||
|
|
|
|||
Loading…
Reference in a new issue