Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3521264
D9410.id32061.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.id32061.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
Tue, Dec 24, 2:47 AM (19 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2696941
Default Alt Text
D9410.id32061.diff (1 KB)
Attached To
Mode
D9410: [web] introduce UserProfileModal component
Attached
Detach File
Event Timeline
Log In to Comment