@@ -3,7 +3,7 @@ import { View, StyleSheet } from 'react-native';
33
44import { AppTheme , AppSpacing } from '../../theme' ;
55import ActionButton from '../ActionButton' ;
6- import { PairList , EmptyState } from '../ListWidgets' ;
6+ import { PairList , EmptyState , LoadingState } from '../ListWidgets' ;
77import MultiPairInputModal from '../modals/MultiPairInputModal' ;
88import PairInputModal from '../modals/PairInputModal' ;
99import SectionCard from '../SectionCard' ;
@@ -12,12 +12,19 @@ const FILTERED_KEYS = ['external_id', 'onesignal_id'];
1212
1313interface Props {
1414 aliases : [ string , string ] [ ] ;
15+ loading ?: boolean ;
1516 onAdd : ( label : string , id : string ) => void ;
1617 onAddMultiple : ( pairs : Record < string , string > ) => void ;
1718 onInfoTap ?: ( ) => void ;
1819}
1920
20- export default function AliasesSection ( { aliases, onAdd, onAddMultiple, onInfoTap } : Props ) {
21+ export default function AliasesSection ( {
22+ aliases,
23+ loading = false ,
24+ onAdd,
25+ onAddMultiple,
26+ onInfoTap,
27+ } : Props ) {
2128 const [ addVisible , setAddVisible ] = useState ( false ) ;
2229 const [ addMultipleVisible , setAddMultipleVisible ] = useState ( false ) ;
2330
@@ -27,7 +34,11 @@ export default function AliasesSection({ aliases, onAdd, onAddMultiple, onInfoTa
2734 < SectionCard title = "Aliases" onInfoTap = { onInfoTap } sectionKey = "aliases" >
2835 { filtered . length === 0 ? (
2936 < View style = { [ AppTheme . card , styles . listCard ] } >
30- < EmptyState message = "No aliases added" testID = "aliases_empty" />
37+ { loading ? (
38+ < LoadingState testID = "aliases_loading" />
39+ ) : (
40+ < EmptyState message = "No aliases added" testID = "aliases_empty" />
41+ ) }
3142 </ View >
3243 ) : (
3344 < View style = { styles . listCard } >
0 commit comments