File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import { View , Text , StyleSheet } from "react-native" ;
3+ import Button from "react-native-button" ;
4+ import { Actions } from "react-native-router-flux" ;
5+
6+ const styles = StyleSheet . create ( {
7+ container : {
8+ flex : 1 ,
9+ justifyContent : "center" ,
10+ alignItems : "center" ,
11+ backgroundColor : "#F5FCFF" ,
12+ } ,
13+ } ) ;
14+
15+ const popToRoot = ( ) => {
16+ Actions . popTo ( "root" ) ;
17+ }
18+
19+ const popToLogin1 = ( ) => {
20+ Actions . popTo ( "loginModal" ) ;
21+ }
22+
23+ const popToLogin2 = ( ) => {
24+ Actions . popTo ( "loginModal2" ) ;
25+ }
26+
27+ export default class extends React . Component {
28+ render ( ) {
29+ return (
30+ < View style = { styles . container } >
31+ < Text > Login2 page: { this . props . data } </ Text >
32+ < Button onPress = { Actions . pop } > Back</ Button >
33+ < Button onPress = { popToLogin1 } > To Login</ Button >
34+ < Button onPress = { popToLogin2 } > To Login2</ Button >
35+ < Button onPress = { popToRoot } > To Root</ Button >
36+ </ View >
37+ ) ;
38+ }
39+ }
You can’t perform that action at this time.
0 commit comments