Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3398735
D7927.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D7927.diff
View Options
diff --git a/native/account/registration/connect-ethereum.react.js b/native/account/registration/connect-ethereum.react.js
--- a/native/account/registration/connect-ethereum.react.js
+++ b/native/account/registration/connect-ethereum.react.js
@@ -7,6 +7,7 @@
exactSearchUser,
exactSearchUserActionTypes,
} from 'lib/actions/user-actions.js';
+import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
import type { SIWEResult } from 'lib/types/siwe-types.js';
import {
useServerCall,
@@ -24,10 +25,15 @@
ExistingEthereumAccountRouteName,
UsernameSelectionRouteName,
} from '../../navigation/route-names.js';
+import { useSelector } from '../../redux/redux-utils.js';
import { useStyles } from '../../themes/colors.js';
import EthereumLogoDark from '../../vectors/ethereum-logo-dark.react.js';
import SIWEPanel from '../siwe-panel.react.js';
+const exactSearchUserLoadingStatusSelector = createLoadingStatusSelector(
+ exactSearchUserActionTypes,
+);
+
export type ConnectEthereumParams = {
+userSelections: {
+coolOrNerdMode: CoolOrNerdMode,
@@ -151,6 +157,14 @@
);
}
+ const exactSearchUserCallLoading = useSelector(
+ state => exactSearchUserLoadingStatusSelector(state) === 'loading',
+ );
+ const connectButtonVariant =
+ exactSearchUserCallLoading || panelState === 'opening'
+ ? 'loading'
+ : 'enabled';
+
return (
<>
<RegistrationContainer>
@@ -167,7 +181,7 @@
<RegistrationButton
onPress={openPanel}
label="Connect Ethereum wallet"
- variant={panelState === 'opening' ? 'loading' : 'enabled'}
+ variant={connectButtonVariant}
/>
<RegistrationButton
onPress={onSkip}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 3, 12:17 AM (21 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2609411
Default Alt Text
D7927.diff (1 KB)
Attached To
Mode
D7927: [native] Use loading button variant in ConnectEthereum during username search
Attached
Detach File
Event Timeline
Log In to Comment