Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3756827
D9476.id32113.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
672 B
Referenced Files
None
Subscribers
None
D9476.id32113.diff
View Options
diff --git a/web/modals/user-profile/user-profile-utils.js b/web/modals/user-profile/user-profile-utils.js
new file mode 100644
--- /dev/null
+++ b/web/modals/user-profile/user-profile-utils.js
@@ -0,0 +1,17 @@
+// @flow
+
+import * as React from 'react';
+
+import { useModalContext } from 'lib/components/modal-provider.react.js';
+
+import UserProfileModal from './user-profile-modal.react.js';
+
+function usePushUserProfileModal(userID: string): () => mixed {
+ const { pushModal } = useModalContext();
+
+ return React.useCallback(() => {
+ pushModal(<UserProfileModal userID={userID} />);
+ }, [pushModal, userID]);
+}
+
+export { usePushUserProfileModal };
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 11, 6:04 AM (20 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2858715
Default Alt Text
D9476.id32113.diff (672 B)
Attached To
Mode
D9476: [web] introduce usePushUserProfileModal hook
Attached
Detach File
Event Timeline
Log In to Comment