Page MenuHomePhabricator

D13143.diff
No OneTemporary

D13143.diff

diff --git a/native/qr-code/qr-code-screen.react.js b/native/qr-code/qr-code-screen.react.js
--- a/native/qr-code/qr-code-screen.react.js
+++ b/native/qr-code/qr-code-screen.react.js
@@ -18,8 +18,6 @@
+route: NavigationRoute<'QRCodeScreen'>,
};
-const { platform } = getConfig().platformDetails;
-
// eslint-disable-next-line no-unused-vars
function QRCodeScreen(props: QRCodeScreenProps): React.Node {
const { qrData, generateQRCode } = useQRAuthContext();
@@ -28,6 +26,7 @@
void generateQRCode();
}, [generateQRCode]);
+ const { platform } = getConfig().platformDetails;
const qrCodeURL = React.useMemo(() => {
if (!qrData) {
return undefined;
@@ -35,7 +34,7 @@
const deviceType = platformToIdentityDeviceType[platform];
return qrCodeLinkURL(qrData.aesKey, qrData.deviceID, deviceType);
- }, [qrData]);
+ }, [platform, qrData]);
const styles = useStyles(unboundStyles);
return (
diff --git a/web/account/qr-code-login.react.js b/web/account/qr-code-login.react.js
--- a/web/account/qr-code-login.react.js
+++ b/web/account/qr-code-login.react.js
@@ -10,8 +10,6 @@
import css from './qr-code-login.css';
-const { platform } = getConfig().platformDetails;
-
function QRCodeLogin(): React.Node {
const { qrData, generateQRCode } = useQRAuthContext();
@@ -19,6 +17,7 @@
void generateQRCode();
}, [generateQRCode]);
+ const { platform } = getConfig().platformDetails;
const qrCodeURL = React.useMemo(() => {
if (!qrData) {
return undefined;
@@ -27,7 +26,7 @@
const identityDeviceType = platformToIdentityDeviceType[platform];
return qrCodeLinkURL(qrData.aesKey, qrData.deviceID, identityDeviceType);
- }, [qrData]);
+ }, [platform, qrData]);
return (
<div className={css.qrContainer}>

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 27, 1:25 PM (21 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2590538
Default Alt Text
D13143.diff (1 KB)

Event Timeline