diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-07-26 10:19:57 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-07-28 22:29:16 +0800 |
commit | d16f25fc20c98ac06b2e13be6f2732d60919a862 (patch) | |
tree | e04282d1ab90a9845ba57df95398a20ee7968e7c /old-ui/app/app.js | |
parent | 6ae76fee33af8f3079fd650f35df1107e7996ffe (diff) | |
download | tangerine-wallet-browser-d16f25fc20c98ac06b2e13be6f2732d60919a862.tar tangerine-wallet-browser-d16f25fc20c98ac06b2e13be6f2732d60919a862.tar.gz tangerine-wallet-browser-d16f25fc20c98ac06b2e13be6f2732d60919a862.tar.bz2 tangerine-wallet-browser-d16f25fc20c98ac06b2e13be6f2732d60919a862.tar.lz tangerine-wallet-browser-d16f25fc20c98ac06b2e13be6f2732d60919a862.tar.xz tangerine-wallet-browser-d16f25fc20c98ac06b2e13be6f2732d60919a862.tar.zst tangerine-wallet-browser-d16f25fc20c98ac06b2e13be6f2732d60919a862.zip |
Add NewUiAnnouncement component
Diffstat (limited to 'old-ui/app/app.js')
-rw-r--r-- | old-ui/app/app.js | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/old-ui/app/app.js b/old-ui/app/app.js index 4921a29fa..a2606c4ed 100644 --- a/old-ui/app/app.js +++ b/old-ui/app/app.js @@ -24,6 +24,7 @@ const ConfigScreen = require('./config') const AddTokenScreen = require('./add-token') const Import = require('./accounts/import') const InfoScreen = require('./info') +const NewUiAnnouncement = require('./new-ui-annoucement') const AppBar = require('./components/app-bar') const Loading = require('./components/loading') const BuyView = require('./components/buy-button-subview') @@ -82,13 +83,29 @@ function mapStateToProps (state) { } App.prototype.render = function () { - var props = this.props - const { isLoading, loadingMessage, transForward, network } = props - const isLoadingNetwork = network === 'loading' && props.currentView.name !== 'config' - const loadMessage = loadingMessage || isLoadingNetwork ? - `Connecting to ${this.getNetworkName()}` : null + const { + currentView, + dispatch, + isLoading, + loadingMessage, + transForward, + network, + featureFlags, + } = this.props + const isLoadingNetwork = network === 'loading' && currentView.name !== 'config' + const loadMessage = loadingMessage || isLoadingNetwork + ? `Connecting to ${this.getNetworkName()}` + : null log.debug('Main ui render function') + if (!featureFlags.skipAnnounceBetaUI) { + return ( + h(NewUiAnnouncement, { + dispatch, + }) + ) + } + return ( h('.flex-column.full-height', { style: { @@ -99,7 +116,7 @@ App.prototype.render = function () { }, }, [ h(AppBar, { - ...props, + ...this.props, }), this.renderLoadingIndicator({ isLoading, isLoadingNetwork, loadMessage }), |