Add wrapper for password screen and logged-in app
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import React, { Component } from 'react'
|
||||
import { View } from 'react-native'
|
||||
import nodejs from 'nodejs-mobile-react-native'
|
||||
import App from './app'
|
||||
import PasswordPrompt from './password-prompt'
|
||||
|
||||
export default class AppWrapper extends Component {
|
||||
constructor() {
|
||||
super()
|
||||
this.state = {}
|
||||
nodejs.start('main.js')
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<View style={{ flex: 1 }}>
|
||||
{this.state.showApp ?
|
||||
<App/>
|
||||
:
|
||||
<PasswordPrompt
|
||||
onCorrectPassword={() => this.setState({showApp: true})}
|
||||
/>
|
||||
}
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user