Update path for item images
So we can use a CDN on prod
This commit is contained in:
parent
ce691ef9c6
commit
ccb98de069
6 changed files with 8 additions and 8 deletions
|
|
@ -16,7 +16,7 @@ class CharacterResult extends React.Component<Props> {
|
|||
|
||||
return (
|
||||
<li className="CharacterResult" onClick={this.props.onClick}>
|
||||
<img alt={character.name.en} src={`/images/chara-grid/${character.granblue_id}_01.jpg`} />
|
||||
<img alt={character.name.en} src={`${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/chara-grid/${character.granblue_id}_01.jpg`} />
|
||||
<div>
|
||||
<div>
|
||||
<h5>{character.name.en}</h5>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ const CharacterUnit = (props: Props) => {
|
|||
|
||||
if (props.character) {
|
||||
const character = props.character!
|
||||
imgSrc = `/images/chara-main/${character.granblue_id}_01.jpg`
|
||||
imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/chara-main/${character.granblue_id}_01.jpg`
|
||||
}
|
||||
|
||||
setImageUrl(imgSrc)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class SummonResult extends React.Component<Props> {
|
|||
|
||||
return (
|
||||
<li className="SummonResult" onClick={this.props.onClick}>
|
||||
<img alt={summon.name.en} src={`/images/summon-grid/${summon.granblue_id}.jpg`} />
|
||||
<img alt={summon.name.en} src={`${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/summon-grid/${summon.granblue_id}.jpg`} />
|
||||
<div>
|
||||
<div>
|
||||
<h5>{summon.name.en}</h5>
|
||||
|
|
|
|||
|
|
@ -41,9 +41,9 @@ const SummonUnit = (props: Props) => {
|
|||
|
||||
// Generate the correct source for the summon
|
||||
if (props.unitType == 0 || props.unitType == 2)
|
||||
imgSrc = `/images/summon-main/${summon.granblue_id}.jpg`
|
||||
imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/summon-main/${summon.granblue_id}.jpg`
|
||||
else
|
||||
imgSrc = `/images/summon-grid/${summon.granblue_id}.jpg`
|
||||
imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/summon-grid/${summon.granblue_id}.jpg`
|
||||
}
|
||||
|
||||
setImageUrl(imgSrc)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class WeaponResult extends React.Component<Props> {
|
|||
|
||||
return (
|
||||
<li className="WeaponResult" onClick={this.props.onClick}>
|
||||
<img alt={weapon.name.en} src={`/images/weapon-grid/${weapon.granblue_id}.jpg`} />
|
||||
<img alt={weapon.name.en} src={`${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}.jpg`} />
|
||||
<div>
|
||||
<div>
|
||||
<h5>{weapon.name.en}</h5>
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ const WeaponUnit = (props: Props) => {
|
|||
const weapon = props.weapon!
|
||||
|
||||
if (props.unitType == 0)
|
||||
imgSrc = `/images/weapon-main/${weapon.granblue_id}.jpg`
|
||||
imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-main/${weapon.granblue_id}.jpg`
|
||||
else
|
||||
imgSrc = `/images/weapon-grid/${weapon.granblue_id}.jpg`
|
||||
imgSrc = `${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}.jpg`
|
||||
}
|
||||
|
||||
setImageUrl(imgSrc)
|
||||
|
|
|
|||
Loading…
Reference in a new issue