Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3519614
D9410.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D9410.id.diff
View Options
diff --git a/web/modals/user-profile/user-profile-modal.react.js b/web/modals/user-profile/user-profile-modal.react.js
new file mode 100644
--- /dev/null
+++ b/web/modals/user-profile/user-profile-modal.react.js
@@ -0,0 +1,37 @@
+// @flow
+
+import * as React from 'react';
+
+import { useModalContext } from 'lib/components/modal-provider.react.js';
+import type { UserInfo } from 'lib/types/user-types.js';
+
+import UserProfile from './user-profile.react.js';
+import { useSelector } from '../../redux/redux-utils.js';
+import Modal from '../modal.react.js';
+
+type Props = {
+ +userID: string,
+};
+
+function UserProfileModal(props: Props): React.Node {
+ const { userID } = props;
+
+ const { popModal } = useModalContext();
+
+ const userInfo: ?UserInfo = useSelector(
+ state => state.userStore.userInfos[userID],
+ );
+
+ const userProfileModal = React.useMemo(
+ () => (
+ <Modal size="fit-content" onClose={popModal} name="">
+ <UserProfile userInfo={userInfo} />
+ </Modal>
+ ),
+ [popModal, userInfo],
+ );
+
+ return userProfileModal;
+}
+
+export default UserProfileModal;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 10:43 PM (16 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2696941
Default Alt Text
D9410.id.diff (1 KB)
Attached To
Mode
D9410: [web] introduce UserProfileModal component
Attached
Detach File
Event Timeline
Log In to Comment