Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3397473
D10027.id33672.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D10027.id33672.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 2, 5:44 PM (18 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2608437
Default Alt Text
D10027.id33672.diff (2 KB)
Attached To
Mode
D10027: [Flow202][native][skip-ci] [43/x] Add type for BottomSheetRef
Attached
Detach File
Event Timeline
Log In to Comment