@@ -22,6 +22,7 @@ import { useL10n } from "../../../../../../../../hooks/l10n";
22
22
import { Button } from "../../../../../../../../components/client/Button" ;
23
23
import { TelemetryButton } from "../../../../../../../../components/client/TelemetryButton" ;
24
24
import {
25
+ LockIcon ,
25
26
MinusCircledIcon ,
26
27
PlusCircledIcon ,
27
28
} from "../../../../../../../../components/server/Icons" ;
@@ -367,37 +368,41 @@ function EditProfileFormInputs(props: {
367
368
`settings-edit-profile-info-form-input-error-${ profileDataKeyParsed } ` ,
368
369
) }
369
370
/>
370
- < strong >
371
- { l10n . getString (
372
- `settings-edit-profile-info-form-fieldset-section-other-label-${ profileDataKeyParsed } s` ,
373
- ) }
374
- </ strong >
375
371
{ props . profileData [ `${ props . profileDataKey } s` ] . map (
376
372
( item , itemIndex ) => {
377
373
const inputKey = `${ props . profileDataKey } s-${ itemIndex } ` ;
378
374
return (
379
- < div key = { inputKey } className = { styles . inputWrapper } >
380
- < InputField
381
- onChange = { ( value ) =>
382
- props . handleOnInputChange ( value , inputKey )
383
- }
384
- name = { inputKey }
385
- value = { item }
386
- label = { l10n . getString (
387
- `settings-edit-profile-info-form-input-label-other-${ profileDataKeyParsed } ` ,
388
- ) }
389
- hasFloatingLabel
390
- />
391
- < RemoveItemButton
392
- itemKey = { props . profileDataKey }
393
- onRemove = { ( ) => {
394
- props . onRemove (
395
- `${ props . profileDataKey } s` as ProfileDataListKey ,
396
- itemIndex ,
397
- ) ;
398
- } }
399
- />
400
- </ div >
375
+ < Fragment key = { inputKey } >
376
+ { itemIndex === 0 && (
377
+ < strong >
378
+ { l10n . getString (
379
+ `settings-edit-profile-info-form-fieldset-section-other-label-${ profileDataKeyParsed } s` ,
380
+ ) }
381
+ </ strong >
382
+ ) }
383
+ < div className = { styles . inputWrapper } >
384
+ < InputField
385
+ onChange = { ( value ) =>
386
+ props . handleOnInputChange ( value , inputKey )
387
+ }
388
+ name = { inputKey }
389
+ value = { item }
390
+ label = { l10n . getString (
391
+ `settings-edit-profile-info-form-input-label-other-${ profileDataKeyParsed } ` ,
392
+ ) }
393
+ hasFloatingLabel
394
+ />
395
+ < RemoveItemButton
396
+ itemKey = { props . profileDataKey }
397
+ onRemove = { ( ) => {
398
+ props . onRemove (
399
+ `${ props . profileDataKey } s` as ProfileDataListKey ,
400
+ itemIndex ,
401
+ ) ;
402
+ } }
403
+ />
404
+ </ div >
405
+ </ Fragment >
401
406
) ;
402
407
} ,
403
408
) }
@@ -430,7 +435,10 @@ function EditProfileFormInputs(props: {
430
435
) ;
431
436
return (
432
437
< div className = { styles . itemDob } >
433
- { dateOfBirthString }
438
+ < span className = { styles . dobString } >
439
+ { dateOfBirthString }
440
+ < LockIcon alt = "" />
441
+ </ span >
434
442
< p >
435
443
{ l10n . getFragment (
436
444
"settings-edit-profile-info-form-date-of-birth-note" ,
@@ -452,12 +460,20 @@ function EditProfileFormInputs(props: {
452
460
</ div >
453
461
) ;
454
462
case "phone_numbers" :
463
+ const phoneNumbers = itemData ?. length === 0 ? [ "" ] : itemData ;
455
464
return (
456
465
< >
457
- { ( itemData as string [ ] ) . map ( ( item , itemIndex ) => {
466
+ { ( phoneNumbers as string [ ] ) . map ( ( item , itemIndex ) => {
458
467
const inputKey = `${ props . profileDataKey } -${ itemIndex } ` ;
459
468
return (
460
469
< Fragment key = { inputKey } >
470
+ { itemIndex === 1 && (
471
+ < strong >
472
+ { l10n . getString (
473
+ "settings-edit-profile-info-form-fieldset-section-other-label-phone-numbers" ,
474
+ ) }
475
+ </ strong >
476
+ ) }
461
477
< div className = { styles . inputWrapper } >
462
478
< InputField
463
479
type = "tel"
@@ -493,13 +509,6 @@ function EditProfileFormInputs(props: {
493
509
/>
494
510
) }
495
511
</ div >
496
- { itemIndex === 0 && (
497
- < strong >
498
- { l10n . getString (
499
- "settings-edit-profile-info-form-fieldset-section-other-label-phone-numbers" ,
500
- ) }
501
- </ strong >
502
- ) }
503
512
</ Fragment >
504
513
) ;
505
514
} ) }
@@ -534,6 +543,13 @@ function EditProfileFormInputs(props: {
534
543
item . city && item . state ? `${ item . city } , ${ item . state } , USA` : "" ;
535
544
return (
536
545
< Fragment key = { inputKey } >
546
+ { itemIndex === 1 && (
547
+ < strong >
548
+ { l10n . getString (
549
+ "settings-edit-profile-info-form-fieldset-section-other-label-addresses" ,
550
+ ) }
551
+ </ strong >
552
+ ) }
537
553
< div className = { styles . inputWrapper } >
538
554
< LocationAutocompleteInput
539
555
key = { inputKey }
@@ -569,13 +585,6 @@ function EditProfileFormInputs(props: {
569
585
/>
570
586
) }
571
587
</ div >
572
- { itemIndex === 0 && (
573
- < strong >
574
- { l10n . getString (
575
- "settings-edit-profile-info-form-fieldset-section-other-label-addresses" ,
576
- ) }
577
- </ strong >
578
- ) }
579
588
</ Fragment >
580
589
) ;
581
590
} ) }
0 commit comments