@@ -219,63 +219,62 @@ class Checkout extends Component {
219219 const isGuestMode = isGuest ( _ . get ( props . auth , 'user' ) ) ;
220220 const cartFetched = props . fetchCartState . finished ;
221221
222- if ( cartFetched ) {
223- const shippingAddress = _ . get ( this . props . cart , 'shippingAddress' , { } ) ;
224-
225- return (
226- < div styleName = "wrapper" >
227- < div styleName = "main-container" >
228- < div styleName = "row" >
229- < div styleName = "column" >
230- < div styleName = "shipping" >
231- < Shipping
232- isEditing = { props . editStage }
233- onComplete = { this . setShipping }
234- addresses = { this . props . addresses }
235- fetchAddresses = { this . props . fetchAddresses }
236- shippingAddress = { shippingAddress }
237- auth = { this . props . auth }
238- isGuestMode = { isGuestMode }
239- />
240- </ div >
241- < div styleName = "delivery" >
242- < Delivery
243- isEditing = { props . editStage }
244- onComplete = { this . setDelivery }
245- shippingMethods = { props . shippingMethods }
246- cart = { this . props . cart }
247- fetchShippingMethods = { props . fetchShippingMethods }
248- shippingAddressEmpty = { _ . isEmpty ( shippingAddress ) }
249- />
250- </ div >
251- </ div >
252- < div styleName = "payment" >
253- < Billing
222+ if ( ! cartFetched ) {
223+ return < Loader /> ;
224+ }
225+
226+ const shippingAddress = _ . get ( this . props . cart , 'shippingAddress' , { } ) ;
227+
228+ return (
229+ < div styleName = "wrapper" >
230+ < div styleName = "main-container" >
231+ < div styleName = "row" >
232+ < div styleName = "column" >
233+ < div styleName = "shipping" >
234+ < Shipping
235+ isEditing = { props . editStage }
236+ onComplete = { this . setShipping }
237+ addresses = { this . props . addresses }
238+ fetchAddresses = { this . props . fetchAddresses }
239+ shippingAddress = { shippingAddress }
240+ auth = { this . props . auth }
254241 isGuestMode = { isGuestMode }
255- paymentMethods = { _ . get ( props . cart , 'paymentMethods' , [ ] ) }
256- chooseCreditCard = { this . props . chooseCreditCard }
257- onComplete = { this . setBilling }
242+ />
243+ </ div >
244+ < div styleName = "delivery" >
245+ < Delivery
246+ isEditing = { props . editStage }
247+ onComplete = { this . setDelivery }
248+ shippingMethods = { props . shippingMethods }
249+ cart = { this . props . cart }
250+ fetchShippingMethods = { props . fetchShippingMethods }
251+ shippingAddressEmpty = { _ . isEmpty ( shippingAddress ) }
258252 />
259253 </ div >
260254 </ div >
261- < div styleName = "order-summary" >
262- { this . orderContent }
255+ < div styleName = "payment" >
256+ < Billing
257+ isGuestMode = { isGuestMode }
258+ paymentMethods = { _ . get ( props . cart , 'paymentMethods' , [ ] ) }
259+ chooseCreditCard = { this . props . chooseCreditCard }
260+ onComplete = { this . setBilling }
261+ fetchAddresses = { this . props . fetchAddresses }
262+ />
263263 </ div >
264264 </ div >
265- < div styleName = "side-container " >
266- { this . orderTotals }
265+ < div styleName = "order-summary " >
266+ { this . orderContent }
267267 </ div >
268-
269- < GuestAuth
270- isEditing = { ! this . isEmailSetForCheckout ( ) }
271- location = { this . props . location }
272- />
273268 </ div >
274- ) ;
275- }
269+ < div styleName = "side-container" >
270+ { this . orderTotals }
271+ </ div >
276272
277- return (
278- < Loader />
273+ < GuestAuth
274+ isEditing = { ! this . isEmailSetForCheckout ( ) }
275+ location = { this . props . location }
276+ />
277+ </ div >
279278 ) ;
280279 }
281280
0 commit comments