Pull weapon images from different sources depending on env
This commit is contained in:
parent
f9e3b80a0f
commit
2caa096917
2 changed files with 12 additions and 2 deletions
|
|
@ -18,7 +18,12 @@ function WeaponGridMainhand(props: WeaponGridProps) {
|
|||
let imgSrc
|
||||
if (props.weapon) {
|
||||
const weapon = props.weapon!
|
||||
imgSrc = mainhandImages[weapon.granblue_id]
|
||||
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
imgSrc = mainhandImages[weapon.granblue_id]
|
||||
} else if (process.env.NODE_ENV === 'production') {
|
||||
imgSrc = `${process.env.SIERO_IMG_URL}/mainhand/${weapon.granblue_id}.jpg`
|
||||
}
|
||||
}
|
||||
|
||||
const openModalIfEditable = (props.editable) ? openModal : () => {}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,12 @@ function WeaponGridUnit(props: WeaponGridProps) {
|
|||
let imgSrc
|
||||
if (props.weapon) {
|
||||
const weapon = props.weapon!
|
||||
imgSrc = gridImages[weapon.granblue_id]
|
||||
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
imgSrc = gridImages[weapon.granblue_id]
|
||||
} else if (process.env.NODE_ENV === 'production') {
|
||||
imgSrc = `${process.env.SIERO_IMG_URL}/grid/${weapon.granblue_id}.jpg`
|
||||
}
|
||||
}
|
||||
|
||||
const openModalIfEditable = (props.editable) ? openModal : () => {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue