File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change
1
+ import { STORY_ARCHIVE } from '../constants/actionTypes' ;
2
+
3
+ const doArchiveStory = id => ( {
4
+ type : STORY_ARCHIVE ,
5
+ id,
6
+ } ) ;
7
+
8
+ export {
9
+ doArchiveStory ,
10
+ } ;
Original file line number Diff line number Diff line change @@ -3,15 +3,15 @@ import ReactDOM from 'react-dom';
3
3
import App from './components/App' ;
4
4
import store from './store' ;
5
5
import { getReadableStories } from './selectors/story' ;
6
- import { STORY_ARCHIVE } from './constants/actionTypes ' ;
6
+ import { doArchiveStory } from './actions/archive ' ;
7
7
import './index.css' ;
8
8
import registerServiceWorker from './registerServiceWorker' ;
9
9
10
10
function render ( ) {
11
11
ReactDOM . render (
12
12
< App
13
13
stories = { getReadableStories ( store . getState ( ) ) }
14
- onArchive = { id => store . dispatch ( { type : STORY_ARCHIVE , id } ) }
14
+ onArchive = { id => store . dispatch ( doArchiveStory ( id ) ) }
15
15
/> ,
16
16
document . getElementById ( 'root' )
17
17
) ;
You can’t perform that action at this time.
0 commit comments