diff --git a/native/account/logged-out-modal.react.js b/native/account/logged-out-modal.react.js
--- a/native/account/logged-out-modal.react.js
+++ b/native/account/logged-out-modal.react.js
@@ -605,51 +605,87 @@
navigate(RegistrationRouteName);
}, [navigate]);
- let panel = null;
- let buttons = null;
- if (mode.curMode === 'log-in') {
- panel = (
-
- );
- } else if (mode.curMode === 'register') {
- panel = (
-
- );
- } else if (mode.curMode === 'prompt') {
- const opacityStyle = { opacity: buttonOpacity };
+ const panel = React.useMemo(() => {
+ if (mode.curMode === 'log-in') {
+ return (
+
+ );
+ } else if (mode.curMode === 'register') {
+ return (
+
+ );
+ } else if (mode.curMode === 'loading') {
+ return (
+
+ );
+ }
+ return null;
+ }, [
+ mode.curMode,
+ setActiveAlert,
+ panelOpacity,
+ logInStateContainer,
+ legacyRegisterStateContainer,
+ styles.loadingIndicator,
+ ]);
+
+ const classicAuthButtonStyle = React.useMemo(
+ () => [styles.button, styles.classicAuthButton],
+ [styles.button, styles.classicAuthButton],
+ );
+ const classicAuthButtonTextStyle = React.useMemo(
+ () => [styles.buttonText, styles.classicAuthButtonText],
+ [styles.buttonText, styles.classicAuthButtonText],
+ );
+ const siweAuthButtonStyle = React.useMemo(
+ () => [styles.button, styles.siweButton],
+ [styles.button, styles.siweButton],
+ );
+ const siweAuthButtonTextStyle = React.useMemo(
+ () => [styles.buttonText, styles.siweButtonText],
+ [styles.buttonText, styles.siweButtonText],
+ );
+ const buttonsViewStyle = React.useMemo(
+ () => [styles.buttonContainer, { opacity: buttonOpacity }],
+ [styles.buttonContainer, buttonOpacity],
+ );
+ const buttons = React.useMemo(() => {
+ if (mode.curMode !== 'prompt') {
+ return null;
+ }
const registerButtons = [];
registerButtons.push(
-
- Register
-
+ Register
,
);
if (enableNewRegistrationMode) {
registerButtons.push(
-
- Register (new)
-
+ Register (new)
,
);
}
@@ -658,44 +694,38 @@
signInButtons.push(
-
- Sign in
-
+ Sign in
,
);
if (__DEV__) {
signInButtons.push(
-
- Sign in (QR)
-
+ Sign in (QR)
,
);
}
- buttons = (
-
+ return (
+
-
- Sign in with Ethereum
-
+ Sign in with Ethereum
@@ -706,15 +736,26 @@
{registerButtons}
);
- } else if (mode.curMode === 'loading') {
- panel = (
-
- );
- }
+ }, [
+ mode.curMode,
+ onPressRegister,
+ onPressNewRegister,
+ onPressLogIn,
+ onPressQRCodeSignIn,
+ onPressSIWE,
+ classicAuthButtonStyle,
+ classicAuthButtonTextStyle,
+ siweAuthButtonStyle,
+ siweAuthButtonTextStyle,
+ buttonsViewStyle,
+ styles.siweIcon,
+ styles.siweOr,
+ styles.siweOrLeftHR,
+ styles.siweOrText,
+ styles.siweOrRightHR,
+ styles.signInButtons,
+ styles.registerButtons,
+ ]);
const windowWidth = dimensions.width;
const buttonStyle = {