Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32558099
D9261.1767261588.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
782 B
Referenced Files
None
Subscribers
None
D9261.1767261588.diff
View Options
diff --git a/native/utils/user-profile-utils.js b/native/utils/user-profile-utils.js
new file mode 100644
--- /dev/null
+++ b/native/utils/user-profile-utils.js
@@ -0,0 +1,24 @@
+// @flow
+
+import { useNavigation } from '@react-navigation/native';
+import * as React from 'react';
+
+import { UserProfileBottomSheetRouteName } from '../navigation/route-names.js';
+
+function useNavigateToUserProfileBottomSheet(): (userID: string) => mixed {
+ const { navigate } = useNavigation();
+
+ return React.useCallback(
+ (userID: string) => {
+ navigate<'UserProfileBottomSheet'>({
+ name: UserProfileBottomSheetRouteName,
+ params: {
+ userID,
+ },
+ });
+ },
+ [navigate],
+ );
+}
+
+export { useNavigateToUserProfileBottomSheet };
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 1, 9:59 AM (15 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5875705
Default Alt Text
D9261.1767261588.diff (782 B)
Attached To
Mode
D9261: [native] introduce useNavigateToUserProfileBottomSheet hook
Attached
Detach File
Event Timeline
Log In to Comment