瀏覽代碼

removed button for navigation to mocion screen

Ricardo-gonzalez32 2 年之前
父節點
當前提交
5858f8a4b3
共有 1 個文件被更改,包括 5 次插入13 次删除
  1. 5
    13
      MocionesIUPI/screens/PincodeScreen.js

+ 5
- 13
MocionesIUPI/screens/PincodeScreen.js 查看文件

@@ -23,7 +23,10 @@ export default class App extends React.Component {
23 23
           .then(() => this.setState({ code: '' }));
24 24
 
25 25
         } else {
26
-          this.setState({ pincode: true});
26
+          //move to the mocion page
27
+          this.props.navigation.navigate('Mocion', {Pin:code});
28
+          this.setState({ code: '' });
29
+
27 30
         }
28 31
         
29 32
   
@@ -33,17 +36,9 @@ export default class App extends React.Component {
33 36
       
34 37
     }
35 38
     
36
-    
37
-    pressHandler = (code) => {
38
-    {/*Dentro del parentesis va el path al screen para redirigir*/}
39
-      this.props.navigation.navigate('Mocion', {Pin:code})
40
-      this.setState({ pincode: false});
41
-      this.setState({ code: '' })
42
-    }
43 39
 
44 40
     state = {
45 41
       code: '',
46
-      pincode: false,
47 42
     };
48 43
 
49 44
     pinInput = React.createRef();
@@ -65,10 +60,7 @@ export default class App extends React.Component {
65 60
               onBackspace={() => console.log('No more back.')}
66 61
               />
67 62
           </View>
68
-          
69
-          <View style={globalStyles.container}>
70
-            { pincode && this.pressHandler(code)} 
71
-          </View>
63
+         
72 64
 
73 65
         </View>
74 66
       );