RemoveStatusService fleshed out, still doesn't send Salmon slaps though
This commit is contained in:
parent
413e700fe0
commit
926eea89b5
5 changed files with 84 additions and 19 deletions
|
@ -1,9 +1,9 @@
|
|||
import { Provider } from 'react-redux';
|
||||
import configureStore from '../store/configureStore';
|
||||
import Frontend from '../components/frontend';
|
||||
import { setTimeline, updateTimeline } from '../actions/timelines';
|
||||
import { setAccessToken } from '../actions/meta';
|
||||
import PureRenderMixin from 'react-addons-pure-render-mixin';
|
||||
import { Provider } from 'react-redux';
|
||||
import configureStore from '../store/configureStore';
|
||||
import Frontend from '../components/frontend';
|
||||
import { setTimeline, updateTimeline, deleteFromTimelines } from '../actions/timelines';
|
||||
import { setAccessToken } from '../actions/meta';
|
||||
import PureRenderMixin from 'react-addons-pure-render-mixin';
|
||||
|
||||
const store = configureStore();
|
||||
|
||||
|
@ -32,7 +32,11 @@ const Root = React.createClass({
|
|||
disconnected: function() {},
|
||||
|
||||
received: function(data) {
|
||||
return store.dispatch(updateTimeline(data.timeline, JSON.parse(data.message)));
|
||||
if (data.type === 'update') {
|
||||
return store.dispatch(updateTimeline(data.timeline, JSON.parse(data.message)));
|
||||
} else if (data.type === 'delete') {
|
||||
return store.dispatch(deleteFromTimelines(data.id));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue