Update global vars
This commit is contained in:
parent
e8088bc0d1
commit
83a3e45315
9 changed files with 15 additions and 15 deletions
|
|
@ -3,6 +3,6 @@ NODE_PATH='src/'
|
|||
|
||||
# App URLs
|
||||
# Don't add a trailing slash to these URLs.
|
||||
SIERO_API_URL=''
|
||||
SIERO_OAUTH_URL=''
|
||||
SIERO_IMG_URL=''
|
||||
REACT_APP_SIERO_API_URL=''
|
||||
REACT_APP_SIERO_OAUTH_URL=''
|
||||
REACT_APP_SIERO_IMG_URL=''
|
||||
|
|
@ -20,7 +20,7 @@ class CharacterResult extends React.Component<Props> {
|
|||
if (process.env.NODE_ENV === 'development') {
|
||||
imgSrc = images[character.granblue_id]
|
||||
} else if (process.env.NODE_ENV === 'production') {
|
||||
imgSrc = `${process.env.SIERO_IMG_URL}/chara-grid/${character.granblue_id}.jpg`
|
||||
imgSrc = `${process.env.REACT_APP_SIERO_IMG_URL}/chara-grid/${character.granblue_id}.jpg`
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ const CharacterUnit = (props: Props) => {
|
|||
if (process.env.NODE_ENV === 'development') {
|
||||
imgSrc = images[character.granblue_id]
|
||||
} else if (process.env.NODE_ENV === 'production') {
|
||||
imgSrc = `${process.env.SIERO_IMG_URL}/chara-main/${character.granblue_id}.jpg`
|
||||
imgSrc = `${process.env.REACT_APP_SIERO_IMG_URL}/chara-main/${character.granblue_id}.jpg`
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ const GridRep = (props: Props) => {
|
|||
? <img src={
|
||||
process.env.NODE_ENV === 'development'
|
||||
? mainhandImages[mainhand?.granblue_id || 0]
|
||||
: `${process.env.SIERO_IMG_URL}/weapon-main/${mainhand?.granblue_id}.jpg`
|
||||
: `${process.env.REACT_APP_SIERO_IMG_URL}/weapon-main/${mainhand?.granblue_id}.jpg`
|
||||
} />
|
||||
: <img />
|
||||
}
|
||||
|
|
@ -53,7 +53,7 @@ const GridRep = (props: Props) => {
|
|||
? <img src={
|
||||
process.env.NODE_ENV === 'development'
|
||||
? gridImages[weapons[position]?.granblue_id || 0]
|
||||
: `${process.env.SIERO_IMG_URL}/weapon-grid/${weapons[position]?.granblue_id}.jpg`
|
||||
: `${process.env.REACT_APP_SIERO_IMG_URL}/weapon-grid/${weapons[position]?.granblue_id}.jpg`
|
||||
} />
|
||||
: <img />
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class SummonResult extends React.Component<Props> {
|
|||
if (process.env.NODE_ENV === 'development') {
|
||||
imgSrc = gridImages[summon.granblue_id]
|
||||
} else if (process.env.NODE_ENV === 'production') {
|
||||
imgSrc = `${process.env.SIERO_IMG_URL}/summon-grid/${summon.granblue_id}.jpg`
|
||||
imgSrc = `${process.env.REACT_APP_SIERO_IMG_URL}/summon-grid/${summon.granblue_id}.jpg`
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ const SummonUnit = (props: Props) => {
|
|||
imgSrc = gridImages[summon.granblue_id]
|
||||
} else if (process.env.NODE_ENV === 'production') {
|
||||
if (props.unitType == 0 || props.unitType == 2)
|
||||
imgSrc = `${process.env.SIERO_IMG_URL}/summon-main/${summon.granblue_id}.jpg`
|
||||
imgSrc = `${process.env.REACT_APP_SIERO_IMG_URL}/summon-main/${summon.granblue_id}.jpg`
|
||||
else
|
||||
imgSrc = `${process.env.SIERO_IMG_URL}/summon-grid/${summon.granblue_id}.jpg`
|
||||
imgSrc = `${process.env.REACT_APP_SIERO_IMG_URL}/summon-grid/${summon.granblue_id}.jpg`
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class WeaponResult extends React.Component<Props> {
|
|||
if (process.env.NODE_ENV === 'development') {
|
||||
imgSrc = gridImages[weapon.granblue_id]
|
||||
} else if (process.env.NODE_ENV === 'production') {
|
||||
imgSrc = `${process.env.SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}.jpg`
|
||||
imgSrc = `${process.env.REACT_APP_SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}.jpg`
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ const WeaponUnit = (props: Props) => {
|
|||
imgSrc = gridImages[weapon.granblue_id]
|
||||
} else if (process.env.NODE_ENV === 'production') {
|
||||
if (props.unitType == 0)
|
||||
imgSrc = `${process.env.SIERO_IMG_URL}/weapon-main/${weapon.granblue_id}.jpg`
|
||||
imgSrc = `${process.env.REACT_APP_SIERO_IMG_URL}/weapon-main/${weapon.granblue_id}.jpg`
|
||||
else
|
||||
imgSrc = `${process.env.SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}.jpg`
|
||||
imgSrc = `${process.env.REACT_APP_SIERO_IMG_URL}/weapon-grid/${weapon.granblue_id}.jpg`
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class Api {
|
|||
}
|
||||
|
||||
login(object: {}) {
|
||||
return axios.post(`${ process.env.SIERO_OAUTH_URL || 'http://127.0.0.1:3000/oauth' }/token`, object)
|
||||
return axios.post(`${ process.env.REACT_APP_SIERO_OAUTH_URL || 'http://127.0.0.1:3000/oauth' }/token`, object)
|
||||
}
|
||||
|
||||
search(object: string, query: string) {
|
||||
|
|
@ -62,7 +62,7 @@ class Api {
|
|||
}
|
||||
}
|
||||
|
||||
const api: Api = new Api({ url: process.env.SIERO_API_URL || 'http://127.0.0.1:3000/api/v1' })
|
||||
const api: Api = new Api({ url: process.env.REACT_APP_SIERO_API_URL || 'http://127.0.0.1:3000/api/v1' })
|
||||
api.createEntity( { name: 'users' })
|
||||
api.createEntity( { name: 'parties' })
|
||||
api.createEntity( { name: 'characters' })
|
||||
|
|
|
|||
Loading…
Reference in a new issue