This repository was archived by the owner on May 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -71,19 +71,7 @@ class CodePushDemoApp extends Component {
71
71
}
72
72
73
73
render ( ) {
74
- let syncView , syncButton , progressView ;
75
-
76
- if ( this . state . syncMessage ) {
77
- syncView = (
78
- < Text style = { styles . messages } > { this . state . syncMessage } </ Text >
79
- ) ;
80
- } else {
81
- syncButton = (
82
- < TouchableOpacity onPress = { this . sync . bind ( this ) } >
83
- < Text style = { styles . syncButton } > Start Sync!</ Text >
84
- </ TouchableOpacity >
85
- ) ;
86
- }
74
+ let progressView ;
87
75
88
76
if ( this . state . progress ) {
89
77
progressView = (
@@ -96,8 +84,10 @@ class CodePushDemoApp extends Component {
96
84
< Text style = { styles . welcome } >
97
85
Welcome to CodePush!
98
86
</ Text >
99
- { syncButton }
100
- { syncView }
87
+ < TouchableOpacity onPress = { this . sync . bind ( this ) } >
88
+ < Text style = { styles . syncButton } > Start Sync!</ Text >
89
+ </ TouchableOpacity >
90
+ < Text style = { styles . messages } > { this . state . syncMessage || "" } </ Text >
101
91
{ progressView }
102
92
< Image style = { styles . image } resizeMode = { Image . resizeMode . contain } source = { require ( "./images/laptop_phone_howitworks.png" ) } />
103
93
< TouchableOpacity onPress = { this . toggleAllowRestart . bind ( this ) } >
You can’t perform that action at this time.
0 commit comments