From ca04e3bbc3be78edd4ba7c9f051543499dcfa0f3 Mon Sep 17 00:00:00 2001 From: Florian Orben Date: Thu, 29 Oct 2015 17:31:47 +0100 Subject: fix component unmount --- web/react/components/edit_post_modal.jsx | 2 +- web/react/components/post_attachment.jsx | 69 ++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 web/react/components/post_attachment.jsx (limited to 'web') diff --git a/web/react/components/edit_post_modal.jsx b/web/react/components/edit_post_modal.jsx index d8d7bc423..2629d6b25 100644 --- a/web/react/components/edit_post_modal.jsx +++ b/web/react/components/edit_post_modal.jsx @@ -123,7 +123,7 @@ export default class EditPostModal extends React.Component { } componentWillUnmount() { PostStore.removeEditPostListener(this.handleEditPostEvent); - PreferenceStore.removeEditPostListener(this.onPreferenceChange); + PreferenceStore.removeChangeListener(this.onPreferenceChange); } render() { var error = (

); diff --git a/web/react/components/post_attachment.jsx b/web/react/components/post_attachment.jsx new file mode 100644 index 000000000..d92637749 --- /dev/null +++ b/web/react/components/post_attachment.jsx @@ -0,0 +1,69 @@ +export default class PostAttachment extends React.Component { + constructor(props) { + super(props); + } + + render() { + return ( +
+ {'Pre text'} +
+
+ + + {'@testuser'} + +

+ + {'Attachment title'} + +

+
+
+

+ {'This is the main text in a message attachment, and can contain standard message markup (see details below).'} +

+ + + + + + + + + + + + + + +
{'Assigned to'}{'Priority'}
{'Paul'}{'Critical'}
+
+
+ +
+
+
+
+
+
+ ); + } +} \ No newline at end of file -- cgit v1.2.3-1-g7c22