1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Stopping wrapping provider children in div; stop wrapping old-ui in provider.

This commit is contained in:
Dan 2018-03-29 20:16:45 -02:30
parent 949ac352de
commit ad603da2e7
3 changed files with 5 additions and 6 deletions

View File

@ -1,6 +1,5 @@
const { Component } = require('react')
const connect = require('react-redux').connect
const h = require('react-hyperscript')
const PropTypes = require('prop-types')
const t = require('../i18n-helper').getMessage
@ -13,7 +12,7 @@ class I18nProvider extends Component {
}
render() {
return h('div', [ this.props.children ])
return this.props.children
}
}

View File

@ -3,7 +3,6 @@ const Component = require('react').Component
const Provider = require('react-redux').Provider
const h = require('react-hyperscript')
const SelectedApp = require('./select-app')
const I18nProvider = require('./i18n-provider')
module.exports = Root
@ -16,7 +15,7 @@ Root.prototype.render = function () {
h(Provider, {
store: this.props.store,
}, [
h(I18nProvider, [ h(SelectedApp) ]),
h(SelectedApp),
])
)

View File

@ -7,6 +7,7 @@ const OldApp = require('../../old-ui/app/app')
const { autoAddToBetaUI } = require('./selectors')
const { setFeatureFlag, setNetworkEndpoints } = require('./actions')
const { BETA_UI_NETWORK_TYPE } = require('../../app/scripts/config').enums
const I18nProvider = require('./i18n-provider')
function mapStateToProps (state) {
return {
@ -62,7 +63,7 @@ SelectedApp.prototype.render = function () {
// const Selected = betaUI || isMascara || firstTime ? App : OldApp
const { betaUI, isMascara } = this.props
const Selected = betaUI || isMascara ? App : OldApp
const Selected = betaUI || isMascara ? h(I18nProvider, [ h(App) ]) : h(OldApp)
return h(Selected)
return Selected
}