@@ -355,88 +355,6 @@ export default class BasicInfo extends ConsentComponent {
355355 /**
356356 * Process basic info state
357357 */
358- << < << << HEAD
359- processBasicInfo = ( value ) => {
360- const { newBasicInfo } = this . state ;
361- const { handle, profile } = this . props ;
362- newBasicInfo . handle = handle ;
363- if ( _ . has ( value , 'addresses' ) && value . addresses . length > 0 ) {
364- newBasicInfo . addresses [ 0 ] . city = value . addresses [ 0 ] . city ? value . addresses [ 0 ] . city : '' ;
365- newBasicInfo . addresses [ 0 ] . stateCode = value . addresses [ 0 ] . stateCode ? value . addresses [ 0 ] . stateCode : '' ;
366- newBasicInfo . addresses [ 0 ] . streetAddr1 = value . addresses [ 0 ] . streetAddr1 ? value . addresses [ 0 ] . streetAddr1 : '' ;
367- newBasicInfo . addresses [ 0 ] . streetAddr2 = value . addresses [ 0 ] . streetAddr2 ? value . addresses [ 0 ] . streetAddr2 : '' ;
368- newBasicInfo . addresses [ 0 ] . zip = value . addresses [ 0 ] . zip ? value . addresses [ 0 ] . zip : '' ;
369- if ( newBasicInfo . addresses [ 0 ] . streetAddr1 === '' && _ . has ( value , 'address' ) ) {
370- newBasicInfo . addresses [ 0 ] . streetAddr1 = value . address ;
371- }
372- } else {
373- newBasicInfo . addresses [ 0 ] . city = _ . has ( value , 'city' ) ? value . city : '' ;
374- newBasicInfo . addresses [ 0 ] . stateCode = _ . has ( value , 'state' ) ? value . state : '' ;
375- newBasicInfo . addresses [ 0 ] . streetAddr1 = _ . has ( value , 'address' ) ? value . address : '' ;
376- newBasicInfo . addresses [ 0 ] . zip = _ . has ( value , 'zipCode' ) ? value . zipCode : '' ;
377- }
378- if ( _ . has ( value , 'birthDate' ) ) {
379- const newDate = moment ( value . birthDate ) . utc ( ) ;
380- if ( newDate . isValid ( ) ) {
381- newBasicInfo . birthDate = newDate ;
382- }
383- }
384- if ( _ . has ( value , 'competitionCountryCode' ) ) {
385- newBasicInfo . competitionCountryCode = value . competitionCountryCode ;
386- } else {
387- newBasicInfo . competitionCountryCode = profile . competitionCountryCode ;
388- }
389- if ( _ . has ( value , 'country' ) ) {
390- newBasicInfo . country = value . country ;
391- }
392- if ( _ . has ( value , 'currentLocation' ) ) {
393- newBasicInfo . currentLocation = value . currentLocation ;
394- }
395- if ( _ . has ( value , 'description' ) ) {
396- if ( _ . trim ( value . description ) . length ) {
397- newBasicInfo . description = value . description ;
398- }
399- } else {
400- newBasicInfo . description = profile . description ? profile . description : '' ;
401- }
402- if ( _ . has ( value , 'email' ) ) {
403- newBasicInfo . email = value . email ;
404- } else {
405- newBasicInfo . email = profile . email ;
406- }
407- if ( _ . has ( value , 'firstName' ) ) {
408- newBasicInfo . firstName = value . firstName ;
409- } else {
410- newBasicInfo . firstName = '' ;
411- }
412- if ( _ . has ( value , 'gender' ) ) {
413- newBasicInfo . gender = value . gender ;
414- } else {
415- newBasicInfo . gender = profile . gender ;
416- }
417- if ( _ . has ( value , 'homeCountryCode' ) ) {
418- newBasicInfo . homeCountryCode = value . homeCountryCode ;
419- } else {
420- newBasicInfo . homeCountryCode = profile . homeCountryCode ;
421- }
422- if ( _ . has ( value , 'lastName' ) ) {
423- newBasicInfo . lastName = value . lastName ;
424- } else {
425- newBasicInfo . lastName = '' ;
426- }
427- if ( _ . has ( value , 'primaryInterestInTopcoder' ) ) {
428- newBasicInfo . primaryInterestInTopcoder = value . primaryInterestInTopcoder ;
429- }
430- if ( _ . has ( value , 'status' ) ) {
431- newBasicInfo . status = value . status ;
432- } else {
433- newBasicInfo . status = profile . status ;
434- }
435- if ( _ . has ( value , 'tracks' ) ) {
436- newBasicInfo . tracks = value . tracks ? value . tracks : [ ] ;
437- } else {
438- newBasicInfo . tracks = profile . tracks ? profile . tracks : [ ] ;
439- = === ===
440358 processBasicInfo = ( value , profile ) => {
441359 const { newBasicInfo, newProfileInfo : profileInfo } = this . state ;
442360 if ( _ . has ( profile , 'handle' ) ) {
@@ -454,7 +372,6 @@ export default class BasicInfo extends ConsentComponent {
454372 return acc ;
455373 } , { } ) ;
456374 this . setState ( { newBasicInfo : basicInfo , newProfileInfo } ) ;
457- > >>> >>> fix / v5 - settings
458375 }
459376 if ( _ . has ( value , 'tshirtSize' ) ) {
460377 newBasicInfo . tshirtSize = value . tshirtSize ;
0 commit comments