Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3393630
D4206.id13333.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
D4206.id13333.diff
View Options
diff --git a/web/modals/chat/invalid-upload.react.js b/web/modals/chat/invalid-upload.react.js
--- a/web/modals/chat/invalid-upload.react.js
+++ b/web/modals/chat/invalid-upload.react.js
@@ -7,33 +7,23 @@
import Modal from '../modal.react';
import css from './invalid-upload.css';
-type Props = {
- +popModal: () => void,
-};
-class InvalidUploadModal extends React.PureComponent<Props> {
- render(): React.Node {
- return (
- <Modal name="Invalid upload" onClose={this.props.popModal}>
- <div className={css.modal_body}>
- <p>We don't support that file type yet :(</p>
- <Button
- onClick={this.props.popModal}
- type="submit"
- variant="primary"
- className={css.ok_button}
- >
- OK
- </Button>
- </div>
- </Modal>
- );
- }
-}
-
-function ConnectedInvalidUploadModal(): React.Node {
+function InvalidUploadModal(): React.Node {
const modalContext = useModalContext();
-
- return <InvalidUploadModal popModal={modalContext.popModal} />;
+ return (
+ <Modal name="Invalid upload" onClose={modalContext.popModal}>
+ <div className={css.modal_body}>
+ <p>We don't support that file type yet :(</p>
+ <Button
+ onClick={modalContext.popModal}
+ type="submit"
+ variant="primary"
+ className={css.ok_button}
+ >
+ OK
+ </Button>
+ </div>
+ </Modal>
+ );
}
-export default ConnectedInvalidUploadModal;
+export default InvalidUploadModal;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 1, 3:13 PM (21 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2605325
Default Alt Text
D4206.id13333.diff (1 KB)
Attached To
Mode
D4206: [web] Turn `InvalidUploadModal` into a functional component
Attached
Detach File
Event Timeline
Log In to Comment