Continue fixing linter errors
This commit is contained in:
parent
4f11f88c0f
commit
4b960308d4
1 changed files with 7 additions and 4 deletions
|
|
@ -95,11 +95,14 @@ const GridRep = (props: Props) => {
|
||||||
function generateGridImage(position: number) {
|
function generateGridImage(position: number) {
|
||||||
let url = ""
|
let url = ""
|
||||||
|
|
||||||
if (weapons[position] && grid[position]) {
|
const weapon = weapons[position]
|
||||||
if (weapons[position]?.element == 0 && grid[position]?.element) {
|
const gridWeapon = grid[position]
|
||||||
url = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${weapons[position]?.granblue_id}_${grid[position].element}.jpg`
|
|
||||||
|
if (weapon && gridWeapon) {
|
||||||
|
if (weapon.element == 0 && gridWeapon.element) {
|
||||||
|
url = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}_${gridWeapon.element}.jpg`
|
||||||
} else {
|
} else {
|
||||||
url = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${weapons[position]?.granblue_id}.jpg`
|
url = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}.jpg`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue