aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/select-app.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/select-app.js')
-rw-r--r--ui/app/select-app.js65
1 files changed, 0 insertions, 65 deletions
diff --git a/ui/app/select-app.js b/ui/app/select-app.js
deleted file mode 100644
index f5f9e33ab..000000000
--- a/ui/app/select-app.js
+++ /dev/null
@@ -1,65 +0,0 @@
-const inherits = require('util').inherits
-const Component = require('react').Component
-const connect = require('react-redux').connect
-const h = require('react-hyperscript')
-const { HashRouter } = require('react-router-dom')
-const App = require('./app')
-const OldApp = require('../../old-ui/app/app')
-const { getShouldUseNewUi } = require('./selectors')
-const { setFeatureFlag } = require('./actions')
-const I18nProvider = require('./i18n-provider')
-
-function mapStateToProps (state) {
- return {
- isMascara: state.metamask.isMascara,
- shouldUseNewUi: getShouldUseNewUi(state),
- }
-}
-
-function mapDispatchToProps (dispatch) {
- return {
- setFeatureFlagWithModal: () => {
- return dispatch(setFeatureFlag('betaUI', true, 'BETA_UI_NOTIFICATION_MODAL'))
- },
- setFeatureFlagWithoutModal: () => {
- return dispatch(setFeatureFlag('betaUI', true))
- },
- }
-}
-module.exports = connect(mapStateToProps, mapDispatchToProps)(SelectedApp)
-
-inherits(SelectedApp, Component)
-function SelectedApp () {
- Component.call(this)
-}
-
-SelectedApp.prototype.componentWillReceiveProps = function (nextProps) {
- // Code commented out until we begin auto adding users to NewUI
- const {
- // isUnlocked,
- // setFeatureFlagWithModal,
- setFeatureFlagWithoutModal,
- isMascara,
- // firstTime,
- } = this.props
-
- // if (isMascara || firstTime) {
- if (isMascara) {
- setFeatureFlagWithoutModal()
- }
- // } else if (!isUnlocked && nextProps.isUnlocked && (nextProps.autoAdd)) {
- // setFeatureFlagWithModal()
- // }
-}
-
-SelectedApp.prototype.render = function () {
- const { shouldUseNewUi } = this.props
- const newUi = h(HashRouter, {
- hashType: 'noslash',
- }, [
- h(I18nProvider, [
- h(App),
- ]),
- ])
- return shouldUseNewUi ? newUi : h(OldApp)
-}