Page MenuHomePhabricator

D10027.id.diff
No OneTemporary

D10027.id.diff

diff --git a/native/account/siwe-panel.react.js b/native/account/siwe-panel.react.js
--- a/native/account/siwe-panel.react.js
+++ b/native/account/siwe-panel.react.js
@@ -20,6 +20,7 @@
import { useKeyboardHeight } from '../keyboard/keyboard-hooks.js';
import { useSelector } from '../redux/redux-utils.js';
+import type { BottomSheetRef } from '../types/bottom-sheet.js';
import Alert from '../utils/alert.js';
import { getContentSigningKey } from '../utils/crypto-utils.js';
import { defaultLandingURLPrefix } from '../utils/url-utils.js';
@@ -116,7 +117,7 @@
}
}, [isLoading, walletConnectModalHeight, bottomInset, keyboardHeight]);
- const bottomSheetRef = React.useRef();
+ const bottomSheetRef = React.useRef<?BottomSheetRef>();
const snapToIndex = bottomSheetRef.current?.snapToIndex;
React.useEffect(() => {
// When the snapPoints change, always reset to the first one
diff --git a/native/profile/keyserver-selection-bottom-sheet.react.js b/native/profile/keyserver-selection-bottom-sheet.react.js
--- a/native/profile/keyserver-selection-bottom-sheet.react.js
+++ b/native/profile/keyserver-selection-bottom-sheet.react.js
@@ -19,6 +19,7 @@
import type { RootNavigationProp } from '../navigation/root-navigator.react.js';
import type { NavigationRoute } from '../navigation/route-names.js';
import { useColors, useStyles } from '../themes/colors.js';
+import type { BottomSheetRef } from '../types/bottom-sheet.js';
import Alert from '../utils/alert.js';
export type KeyserverSelectionBottomSheetParams = {
@@ -50,7 +51,7 @@
const removeKeyserverContainerRef =
React.useRef<?React.ElementRef<typeof View>>();
- const bottomSheetRef = React.useRef();
+ const bottomSheetRef = React.useRef<?BottomSheetRef>();
const colors = useColors();
const styles = useStyles(unboundStyles);
diff --git a/native/types/bottom-sheet.js b/native/types/bottom-sheet.js
new file mode 100644
--- /dev/null
+++ b/native/types/bottom-sheet.js
@@ -0,0 +1,7 @@
+// @flow
+
+export type BottomSheetRef = {
+ +snapToIndex: number => mixed,
+ +close: () => mixed,
+ ...
+};

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 27, 8:55 PM (6 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2718330
Default Alt Text
D10027.id.diff (2 KB)

Event Timeline