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

Conditionally display disclaimer

This commit is contained in:
Dan Finlay 2016-06-16 16:55:32 -07:00
parent 93fa97f86a
commit 2835112dbf

View File

@ -8,6 +8,7 @@ const extend = require('xtend')
const actions = require('./actions')
const ReactCSSTransitionGroup = require('react-addons-css-transition-group')
// init
const DisclaimerScreen = require('./first-time/disclaimer')
const InitializeMenuScreen = require('./first-time/init-menu')
const CreateVaultScreen = require('./first-time/create-vault')
const CreateVaultCompleteScreen = require('./first-time/create-vault-complete')
@ -39,6 +40,7 @@ function App() { Component.call(this) }
function mapStateToProps(state) {
return {
// state from plugin
isConfirmed: state.metamask.isConfirmed,
isInitialized: state.metamask.isInitialized,
isUnlocked: state.metamask.isUnlocked,
currentView: state.appState.currentView,
@ -240,6 +242,10 @@ App.prototype.renderDropdown = function() {
App.prototype.renderPrimary = function(){
var props = this.props
if (!props.isConfirmed) {
return h(DisclaimerScreen, {key: 'disclaimerScreen'})
}
if (props.seedWords) {
return h(CreateVaultCompleteScreen, {key: 'createVaultComplete'})
}