From be8225b761a3009efd1097a0b4dd4d8f44830a33 Mon Sep 17 00:00:00 2001
From: Reed Garmsen <rgarmsen2295@gmail.com>
Date: Mon, 5 Oct 2015 16:47:17 -0700
Subject: Now handles commenting on a deleted post gracefully, and checks for
 any areas where data may no longer exist once a post has been deleted

---
 web/react/components/post_deleted_modal.jsx | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

(limited to 'web/react/components/post_deleted_modal.jsx')

diff --git a/web/react/components/post_deleted_modal.jsx b/web/react/components/post_deleted_modal.jsx
index 024097428..3f487d20f 100644
--- a/web/react/components/post_deleted_modal.jsx
+++ b/web/react/components/post_deleted_modal.jsx
@@ -14,9 +14,12 @@ export default class PostDeletedModal extends React.Component {
 
         this.state = {};
     }
-    handleClose(e) {
-        e.preventDefault();
-
+    componentDidMount() {
+        $(React.findDOMNode(this.refs.modal)).on('hidden.bs.modal', () => {
+            this.handleClose();
+        });
+    }
+    handleClose() {
         AppDispatcher.handleServerAction({
             type: ActionTypes.RECIEVED_SEARCH,
             results: null
@@ -56,26 +59,25 @@ export default class PostDeletedModal extends React.Component {
                                     data-dismiss='modal'
                                     aria-label='Close'
                                 >
-                                    <span aria-hidden='true'>&times;</span>
+                                    <span aria-hidden='true'>{'×'}</span>
                                 </button>
                                 <h4
                                     className='modal-title'
                                     id='myModalLabel'
                                 >
-                                    Post deleted
+                                    {'Comment could not be posted'}
                                 </h4>
                             </div>
                             <div className='modal-body'>
-                                <p>The post you were viewing was deleted by the owner.</p>
+                                <p>{'Someone deleted the message on which you tried to post a comment.'}</p>
                             </div>
                             <div className='modal-footer'>
                                 <button
                                     type='button'
                                     className='btn btn-primary'
                                     data-dismiss='modal'
-                                    onClick={this.handleClose}
                                 >
-                                    Okay
+                                    {'Okay'}
                                 </button>
                             </div>
                         </div>
-- 
cgit v1.2.3-1-g7c22

