diff --git a/src/common/pages/Vouchers/Payment/index.js b/src/common/pages/Vouchers/Payment/index.js index ebf93cf..f70e85b 100644 --- a/src/common/pages/Vouchers/Payment/index.js +++ b/src/common/pages/Vouchers/Payment/index.js @@ -8,12 +8,13 @@ import { Affix, Card, Slider, Select, Row, Col, Icon, Tag,Rate, Button, Checkbox import {startCase} from 'lodash'; import LoadingDialog from "../../LoadingDialog"; import Loader from 'react-loader-advanced'; -// import './style.scss'; +import './style.scss'; import {DIALOG} from "../../../stores/global_ui"; import EmptyComponent from '../../EmptyComponent'; import NavigationArrowBack from 'material-ui/svg-icons/navigation/arrow-back'; import {LINKS} from "../../../routes"; import {APP_TYPE} from "../../../config/app"; +import get from "lodash.get"; const Panel = Collapse.Panel; @@ -51,16 +52,23 @@ export default class PaymentVouchers extends React.Component { const qty = 1; const total = price * qty; - let applicationName = 'Giift'; - let applicationLogo = 'http://giift.asacreative.com/giift_logo_wide.4d15de72.png'; - if(APP_TYPE === 'btn') { - applicationName = 'BTN'; - applicationLogo = 'http://btn-redemption-2.bangun-kreatif.com/dr6u0fppdi4xy.cloudfront.net/FilesDirectory/Albilad/ImgIconImage/logo-btn.png'; + // let applicationName = 'Giift'; + // let applicationLogo = 'http://giift.asacreative.com/giift_logo_wide.4d15de72.png'; + // if(APP_TYPE === 'btn') { + // applicationName = 'BTN'; + // applicationLogo = 'http://btn-redemption-2.bangun-kreatif.com/dr6u0fppdi4xy.cloudfront.net/FilesDirectory/Albilad/ImgIconImage/logo-btn.png'; + // } + const logoUrl = (this.props.vouchersStore.dataItems.images.logo) ? get(this.vouchersStore.dataItems, 'images.logo', '') : 'http://lorempixel.com/400/200'; + + let image = logoUrl; + + if (!image.includes('http')) { + image = this.http.appendImagePath(image); } return(