Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3374039
D13143.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
D13143.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D13143: [native][web] Fix crash due to getConfig being called before ready
Attached
Detach File
Event Timeline
Log In to Comment