)
}
}
function telumaImage(index: number) {
const baseUrl = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-keys/`
let filename = ''
let altText = ''
// If there is a grid weapon, it is a Draconic Weapon and it has keys
if (
gridWeapon &&
gridWeapon.object.series === 3 &&
gridWeapon.weapon_keys
) {
if (index === 0 && gridWeapon.weapon_keys[0]) {
altText = `${gridWeapon.weapon_keys[0].name[locale]}`
filename = `${gridWeapon.weapon_keys[0].slug}.png`
} else if (index === 1 && gridWeapon.weapon_keys[1]) {
altText = `${gridWeapon.weapon_keys[1].name[locale]}`
const element = gridWeapon.object.element
filename = `${gridWeapon.weapon_keys[1].slug}-${element}.png`
}
return (
)
}
}
function axImages() {
let images: JSX.Element[] = []
if (
gridWeapon &&
gridWeapon.object.ax &&
gridWeapon.ax &&
gridWeapon.ax.length > 0
) {
const numSkills = gridWeapon.ax[1].modifier ? 2 : 1
for (let i = 0; i < numSkills; i++) {
const image = axImage(i)
if (image) images.push(image)
}
}
return images
}
// Methods: Layer element rendering
const weaponModal = () => {
if (gridWeapon) {
return (