|
|
@ -6,10 +6,20 @@ const FadeModal = require('boron').FadeModal |
|
|
|
const actions = require('../../actions') |
|
|
|
const actions = require('../../actions') |
|
|
|
const isMobileView = require('../../../lib/is-mobile-view') |
|
|
|
const isMobileView = require('../../../lib/is-mobile-view') |
|
|
|
const isPopupOrNotification = require('../../../../app/scripts/lib/is-popup-or-notification') |
|
|
|
const isPopupOrNotification = require('../../../../app/scripts/lib/is-popup-or-notification') |
|
|
|
|
|
|
|
const BuyOptions = require('../buy-options') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const MODALS = { |
|
|
|
|
|
|
|
BUY: [ |
|
|
|
|
|
|
|
h(BuyOptions, {}, []), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
EDIT_ACCOUNT_NAME: [], |
|
|
|
|
|
|
|
ACCOUNT_DETAILS: [], |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function mapStateToProps (state) { |
|
|
|
function mapStateToProps (state) { |
|
|
|
return { |
|
|
|
return { |
|
|
|
active: state.appState.modalOpen |
|
|
|
active: state.appState.modal.open, |
|
|
|
|
|
|
|
modalState: state.appState.modal.modalState, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -48,6 +58,8 @@ const backdropStyles = { |
|
|
|
|
|
|
|
|
|
|
|
Modal.prototype.render = function () { |
|
|
|
Modal.prototype.render = function () { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const children = MODALS[this.props.modalState.name] || [] |
|
|
|
|
|
|
|
|
|
|
|
return h(FadeModal, |
|
|
|
return h(FadeModal, |
|
|
|
{ |
|
|
|
{ |
|
|
|
className: 'modal', |
|
|
|
className: 'modal', |
|
|
@ -59,7 +71,7 @@ Modal.prototype.render = function () { |
|
|
|
modalStyle: isMobileView() ? mobileModalStyles : laptopModalStyles, |
|
|
|
modalStyle: isMobileView() ? mobileModalStyles : laptopModalStyles, |
|
|
|
backdropStyle: backdropStyles, |
|
|
|
backdropStyle: backdropStyles, |
|
|
|
}, |
|
|
|
}, |
|
|
|
this.props.children, |
|
|
|
children, |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|