11// @flow
22
33import * as React from 'react'
4- import { Image , View } from 'react-native'
4+ import { Image , TouchableOpacity , View } from 'react-native'
55import { cacheStyles } from 'react-native-patina'
66import { sprintf } from 'sprintf-js'
77
@@ -28,20 +28,25 @@ type OwnProps = {
2828 branding : Branding
2929}
3030type DispatchProps = {
31+ onExit ( ) : void ,
3132 onDone ( ) : void
3233}
3334type Props = OwnProps & DispatchProps & ThemeProps
3435
3536const NewAccountWelcomeScreenComponent = ( {
3637 theme,
3738 branding,
39+ onExit,
3840 onDone
3941} : Props ) => {
4042 const styles = getStyles ( theme )
4143 const appName = branding . appName || s . strings . app_name_default
4244
4345 return (
4446 < ThemedScene >
47+ < TouchableOpacity style = { styles . exitButton } onPress = { onExit } >
48+ < EdgeText style = { styles . exitText } > { s . strings . exit } </ EdgeText >
49+ </ TouchableOpacity >
4550 < SimpleSceneHeader > { s . strings . get_started } </ SimpleSceneHeader >
4651 < View style = { styles . content } >
4752 < Image source = { LOGO_BIG } style = { styles . logo } resizeMode = "contain" />
@@ -102,6 +107,14 @@ const getStyles = cacheStyles((theme: Theme) => ({
102107 marginTop : theme . rem ( 0.75 ) ,
103108 marginBottom : theme . rem ( 1 )
104109 } ,
110+ exitButton : {
111+ marginLeft : theme . rem ( 0.5 ) ,
112+ marginBottom : theme . rem ( 1 )
113+ } ,
114+ exitText : {
115+ color : theme . primaryButton ,
116+ fontSize : theme . rem ( 0.75 )
117+ } ,
105118 welcome : {
106119 fontFamily : theme . fontFaceBold ,
107120 color : theme . secondaryText ,
@@ -142,6 +155,9 @@ const getStyles = cacheStyles((theme: Theme) => ({
142155export const NewAccountWelcomeScreen = connect < { } , DispatchProps, OwnProps > (
143156 ( state : RootState ) => ( { } ) ,
144157 ( dispatch : Dispatch ) = > ( {
158+ onExit ( ) {
159+ dispatch ( { type : 'START_LANDING' } )
160+ } ,
145161 onDone ( ) {
146162 logEvent ( `Signup_Welcome_Next` )
147163 dispatch ( { type : 'WORKFLOW_NEXT' } )
0 commit comments