1
1
import { title } from 'process' ;
2
2
import React , { useMemo } from 'react' ;
3
+ import { View } from 'react-native' ;
3
4
import { ValueOf } from 'type-fest' ;
4
5
import HeaderWithBackButton from '@components/HeaderWithBackButton' ;
5
6
import Icon from '@components/Icon' ;
@@ -38,7 +39,6 @@ function MultiConnectionSelectorPage({policy, route}: MultiConnectionSelectorPag
38
39
const { translate} = useLocalize ( ) ;
39
40
const styles = useThemeStyles ( ) ;
40
41
41
- // s77rt: set popoverAnchorRefs
42
42
const { startIntegrationFlow, popoverAnchorRefs} = useAccountingContext ( ) ;
43
43
44
44
const integrations = CONST . POLICY . CONNECTIONS . MULTI_CONNECTIONS_MAPPING_INVERTED [ multiConnectionName ] ?? [ ] ;
@@ -65,6 +65,14 @@ function MultiConnectionSelectorPage({policy, route}: MultiConnectionSelectorPag
65
65
//shouldDisconnectIntegrationBeforeConnecting: true,
66
66
} ) ;
67
67
} ,
68
+ ref : ( ref ) => {
69
+ if ( ! popoverAnchorRefs ?. current ) {
70
+ return ;
71
+ }
72
+
73
+ // eslint-disable-next-line react-compiler/react-compiler
74
+ popoverAnchorRefs . current [ integration ] . current = ref ;
75
+ } ,
68
76
} ;
69
77
70
78
return connectionsMenuItem ;
@@ -88,11 +96,13 @@ function MultiConnectionSelectorPage({policy, route}: MultiConnectionSelectorPag
88
96
shouldShowOfflineIndicatorInWideScreen
89
97
>
90
98
< HeaderWithBackButton title = { translate ( `workspace.multiConnectionSelector.title` , { connectionName : multiConnectionName } ) } />
91
- < Text style = { [ styles . ph5 , styles . pt3 , styles . mb5 ] } > { translate ( `workspace.multiConnectionSelector.description` , { connectionName : multiConnectionName } ) } </ Text >
92
- < MenuItemList
93
- menuItems = { connectionsMenuItems }
94
- shouldUseSingleExecution
95
- />
99
+ < View style = { [ styles . flexGrow1 ] } >
100
+ < Text style = { [ styles . mb5 , styles . ph5 , styles . pt3 ] } > { translate ( `workspace.multiConnectionSelector.description` , { connectionName : multiConnectionName } ) } </ Text >
101
+ < MenuItemList
102
+ menuItems = { connectionsMenuItems }
103
+ shouldUseSingleExecution
104
+ />
105
+ </ View >
96
106
</ ScreenWrapper >
97
107
</ AccessOrNotFoundWrapper >
98
108
) ;
0 commit comments