@@ -122,6 +122,30 @@ const CheckoutScreen = (props) => {
122
122
}
123
123
return response ;
124
124
} ;
125
+ const renderFooter = ( ) => {
126
+ return (
127
+ < View >
128
+ < View style = { styles . flavorContainer } >
129
+ { /* <Image
130
+ source={require('../assets/sentry-logo.png')}
131
+ style={styles.logo}
132
+ /> */ }
133
+ < Text style = { { marginLeft : 5 , fontWeight : '500' } } >
134
+ Deliver to Sentry - San Francisco { contactInfoData [ 'zipCode' ] }
135
+ </ Text >
136
+ </ View >
137
+ < View >
138
+ < GradientBtn
139
+ buttonText = { styles . buttonText }
140
+ colors = { [ '#002626' , '#001414' ] }
141
+ style = { styles . linearGradient }
142
+ onPress = { ( ) => performCheckoutOnServer ( ) }
143
+ progressState = { orderStatusUI }
144
+ name = { 'Place your order' } > </ GradientBtn >
145
+ </ View >
146
+ </ View >
147
+ )
148
+ }
125
149
126
150
return (
127
151
< View style = { styles . screen } >
@@ -132,10 +156,12 @@ const CheckoutScreen = (props) => {
132
156
fontSize : 18 ,
133
157
fontWeight : '600' ,
134
158
} } > Contact Info</ Text >
135
- < View >
159
+ < View style = { { flex : 1 } } >
136
160
< FlatList
137
161
data = { items }
138
162
appDispatch = { dispatch }
163
+ ListFooterComponent = { renderFooter }
164
+ ListFooterComponentStyle = { styles . flavorContainer }
139
165
renderItem = { ( { item} ) => {
140
166
return (
141
167
< SafeAreaView >
@@ -152,24 +178,7 @@ const CheckoutScreen = (props) => {
152
178
} }
153
179
keyExtractor = { ( item ) => item . id }
154
180
/>
155
- < View style = { styles . flavorContainer } >
156
- { /* <Image
157
- source={require('../assets/sentry-logo.png')}
158
- style={styles.logo}
159
- /> */ }
160
- < Text style = { { marginLeft : 5 , fontWeight : '500' } } >
161
- Deliver to Sentry - San Francisco { contactInfoData [ 'zipCode' ] }
162
- </ Text >
163
- </ View >
164
- < View style = { styles . orderBtnContainer } >
165
- < GradientBtn
166
- buttonText = { styles . buttonText }
167
- colors = { [ '#002626' , '#001414' ] }
168
- style = { styles . linearGradient }
169
- onPress = { ( ) => performCheckoutOnServer ( ) }
170
- progressState = { orderStatusUI }
171
- name = { 'Place your order' } > </ GradientBtn >
172
- </ View >
181
+
173
182
</ View >
174
183
</ View >
175
184
) ;
@@ -214,20 +223,6 @@ const styles = StyleSheet.create({
214
223
width :300 ,
215
224
margin :10 ,
216
225
} ,
217
- orderBtnContainer : {
218
- height : 50 ,
219
-
220
- paddingLeft : 20 ,
221
- paddingRight : 20 ,
222
- // borderRadius: 2,
223
- borderWidth : 1 ,
224
- borderColor : 'white' ,
225
- flexDirection : 'column' ,
226
- justifyContent : 'center' ,
227
-
228
- width :300 ,
229
- margin :10 ,
230
- } ,
231
226
buttonText : {
232
227
textAlign : 'center' ,
233
228
fontSize : 16 ,
0 commit comments