Page MenuHomePhorge

D9261.1767261588.diff
No OneTemporary

Size
782 B
Referenced Files
None
Subscribers
None

D9261.1767261588.diff

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

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)

Event Timeline