@@ -26,13 +26,13 @@ type Props = $ReadOnly<{|
26
26
27
27
export default function AccountPickScreen ( props : Props ) : Node {
28
28
const { navigation } = props ;
29
- const accounts = useGlobalSelector ( getAccountStatuses ) ;
29
+ const accountStatuses = useGlobalSelector ( getAccountStatuses ) ;
30
30
const dispatch = useGlobalDispatch ( ) ;
31
31
const _ = useContext ( TranslationContext ) ;
32
32
33
33
const handleAccountSelect = useCallback (
34
34
async ( index : number ) => {
35
- const { realm, isLoggedIn } = accounts [ index ] ;
35
+ const { realm, isLoggedIn } = accountStatuses [ index ] ;
36
36
if ( isLoggedIn ) {
37
37
setTimeout ( ( ) => {
38
38
dispatch ( accountSwitch ( index ) ) ;
@@ -47,12 +47,12 @@ export default function AccountPickScreen(props: Props): Node {
47
47
}
48
48
}
49
49
} ,
50
- [ accounts , dispatch , navigation , _ ] ,
50
+ [ accountStatuses , dispatch , navigation , _ ] ,
51
51
) ;
52
52
53
53
const handleAccountRemove = useCallback (
54
54
( index : number ) => {
55
- const { realm, email } = accounts [ index ] ;
55
+ const { realm, email } = accountStatuses [ index ] ;
56
56
showConfirmationDialog ( {
57
57
destructive : true ,
58
58
title : 'Remove account' ,
@@ -66,7 +66,7 @@ export default function AccountPickScreen(props: Props): Node {
66
66
_,
67
67
} ) ;
68
68
} ,
69
- [ accounts , _ , dispatch ] ,
69
+ [ accountStatuses , _ , dispatch ] ,
70
70
) ;
71
71
72
72
return (
@@ -78,9 +78,9 @@ export default function AccountPickScreen(props: Props): Node {
78
78
shouldShowLoadingBanner = { false }
79
79
>
80
80
< Centerer >
81
- { accounts . length === 0 && < Logo /> }
81
+ { accountStatuses . length === 0 && < Logo /> }
82
82
< AccountList
83
- accounts = { accounts }
83
+ accountStatuses = { accountStatuses }
84
84
onAccountSelect = { handleAccountSelect }
85
85
onAccountRemove = { handleAccountRemove }
86
86
/>
0 commit comments