diff --git a/js/components/whitelabel/prize/portfolioreview/components/pr_landing.js b/js/components/whitelabel/prize/portfolioreview/components/pr_landing.js index a3f14bef..039a4b45 100644 --- a/js/components/whitelabel/prize/portfolioreview/components/pr_landing.js +++ b/js/components/whitelabel/prize/portfolioreview/components/pr_landing.js @@ -32,10 +32,11 @@ const PRLanding = React.createClass({ componentDidMount() { const { location } = this.props; + PrizeStore.listen(this.onChange); PrizeActions.fetchPrize(); - if (location && location.query && location.query.redirect) { + if (location.query.redirect) { let queryCopy = JSON.parse(JSON.stringify(location.query)); delete queryCopy.redirect; window.setTimeout(() => this.history.replaceState(null, `/${location.query.redirect}`, queryCopy)); diff --git a/js/components/whitelabel/wallet/components/23vivi/23vivi_landing.js b/js/components/whitelabel/wallet/components/23vivi/23vivi_landing.js index f6b2d50c..1219c182 100644 --- a/js/components/whitelabel/wallet/components/23vivi/23vivi_landing.js +++ b/js/components/whitelabel/wallet/components/23vivi/23vivi_landing.js @@ -5,42 +5,32 @@ import React from 'react'; import Button from 'react-bootstrap/lib/Button'; import LinkContainer from 'react-router-bootstrap/lib/LinkContainer'; -import WhitelabelActions from '../../../../../actions/whitelabel_actions'; -import WhitelabelStore from '../../../../../stores/whitelabel_store'; - -import { mergeOptions } from '../../../../../utils/general_utils'; import { getLangText } from '../../../../../utils/lang_utils'; import { setDocumentTitle } from '../../../../../utils/dom_utils'; let Vivi23Landing = React.createClass({ - getInitialState() { - return WhitelabelStore.getState(); + propTypes: { + customThumbnailPlaceholder: React.PropTypes.func, + + // Provided from PrizeApp + currentUser: React.PropTypes.object, + whitelabel: React.PropTypes.object, + + // Provided from router + location: React.PropTypes.object }, componentWillMount() { setDocumentTitle('23VIVI Marketplace'); }, - componentDidMount() { - WhitelabelStore.listen(this.onChange); - WhitelabelActions.fetchWhitelabel(); - }, - - componentWillUnmount() { - WhitelabelStore.unlisten(this.onChange); - }, - - onChange(state) { - this.setState(state); - }, - render() { return (