@@ -18,7 +18,7 @@ import {
1818} from '@togglecorp/fujs' ;
1919
2020import useFilterState from '#hooks/useFilterState' ;
21- import { chooseName } from '#utils/common' ;
21+ import { getFirstTruthyString } from '#utils/common' ;
2222import { type CountryOutletContext } from '#utils/outletContext' ;
2323import {
2424 type GoApiResponse ,
@@ -85,12 +85,12 @@ function LocalUnitsTable() {
8585 createStringColumn < LocalUnitsTableListItem , number > (
8686 'branch_name' ,
8787 strings . localUnitsTableName ,
88- ( item ) => chooseName ( item . local_branch_name , item . english_branch_name ) ,
88+ ( item ) => getFirstTruthyString ( item . local_branch_name , item . english_branch_name ) ,
8989 ) ,
9090 createStringColumn < LocalUnitsTableListItem , number > (
9191 'address' ,
9292 strings . localUnitsTableAddress ,
93- ( item ) => chooseName ( item . address_loc , item . address_en ) ,
93+ ( item ) => getFirstTruthyString ( item . address_loc , item . address_en ) ,
9494 ) ,
9595 createStringColumn < LocalUnitsTableListItem , number > (
9696 'type' ,
@@ -101,17 +101,17 @@ function LocalUnitsTable() {
101101 createStringColumn < LocalUnitsTableListItem , number > (
102102 'focal' ,
103103 strings . localUnitsTableFocal ,
104- ( item ) => chooseName ( item . focal_person_loc , item . focal_person_en ) ,
104+ ( item ) => getFirstTruthyString ( item . focal_person_loc , item . focal_person_en ) ,
105105 ) ,
106106 createStringColumn < LocalUnitsTableListItem , number > (
107107 'phone' ,
108108 strings . localUnitsTablePhoneNumber ,
109- ( item ) => chooseName ( item . phone , item ?. health_details ?. focal_point_phone_number ) ,
109+ ( item ) => item . phone ,
110110 ) ,
111111 createStringColumn < LocalUnitsTableListItem , number > (
112112 'email' ,
113113 strings . localUnitsTableEmail ,
114- ( item ) => chooseName ( item . email , item ?. health_details ?. focal_point_email ) ,
114+ ( item ) => item . email ,
115115 ) ,
116116 createBooleanColumn < LocalUnitsTableListItem , number > (
117117 'validated' ,
0 commit comments