From bd7f965fd634e2aef893f5d602589f769e7fe108 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Fri, 18 Sep 2020 05:24:26 -0700 Subject: [PATCH] Use S3 in production for search modal --- src/components/WeaponResult/WeaponResult.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/WeaponResult/WeaponResult.tsx b/src/components/WeaponResult/WeaponResult.tsx index 65d097d9..78f4552b 100644 --- a/src/components/WeaponResult/WeaponResult.tsx +++ b/src/components/WeaponResult/WeaponResult.tsx @@ -15,10 +15,18 @@ const Proficiency = ['none', 'sword', 'dagger', 'axe', 'spear', 'bow', 'staff', class WeaponResult extends React.Component { render() { + let imgSrc + const weapon = this.props.data + 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` + } + return (
  • - {weapon.name.en} + {weapon.name.en}
    {weapon.name.en}