File tree 3 files changed +9
-3
lines changed
client/assets/javascripts
3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ $(function onLoad() {
7
7
if ( $ ( '#content' ) . length > 0 ) {
8
8
React . render (
9
9
< div >
10
- < CommentBox url = 'comments.json' pollInterval = { 2000 } />
10
+ < CommentBox url = 'comments.json' pollInterval = { 5000 } />
11
11
12
12
< div className = 'container' >
13
13
< a href = 'http://www.railsonmaui.com' >
Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ class CommentStore {
9
9
this . bindListeners ( {
10
10
handleFetchComments : CommentActions . FETCH_COMMENTS ,
11
11
handleUpdateComments : CommentActions . UPDATE_COMMENTS ,
12
- handleUpdateCommentsError : CommentActions . UPDATE_COMMENTS_ERROR
12
+ handleUpdateCommentsError : CommentActions . UPDATE_COMMENTS_ERROR ,
13
+ handleAddComment : CommentActions . ADD_COMMENT
13
14
} ) ;
14
15
}
15
16
Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ class FormStore {
14
14
handleSubmitComment : FormActions . SUBMIT_COMMENT ,
15
15
handleFetchComments : CommentActions . FETCH_COMMENTS ,
16
16
handleUpdateComments : CommentActions . UPDATE_COMMENTS ,
17
- handleUpdateCommentsError : CommentActions . UPDATE_COMMENTS_ERROR
17
+ handleUpdateCommentsError : CommentActions . UPDATE_COMMENTS_ERROR ,
18
+ handleAddComment : CommentActions . ADD_COMMENT
18
19
} ) ;
19
20
}
20
21
@@ -40,6 +41,10 @@ class FormStore {
40
41
handleUpdateCommentsError ( ) {
41
42
this . ajaxSending = false ;
42
43
}
44
+
45
+ handleAddComment ( ) {
46
+ this . ajaxSending = false ;
47
+ }
43
48
}
44
49
45
50
export default alt . createStore ( FormStore , 'FormStore' ) ;
You can’t perform that action at this time.
0 commit comments