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';
33import App from './components/App' ;
44import store from './store' ;
55import { getReadableStories } from './selectors/story' ;
6- import { STORY_ARCHIVE } from './constants/actionTypes ' ;
6+ import { doArchiveStory } from './actions/archive ' ;
77import './index.css' ;
88import registerServiceWorker from './registerServiceWorker' ;
99
1010function render ( ) {
1111 ReactDOM . render (
1212 < App
1313 stories = { getReadableStories ( store . getState ( ) ) }
14- onArchive = { id => store . dispatch ( { type : STORY_ARCHIVE , id } ) }
14+ onArchive = { id => store . dispatch ( doArchiveStory ( id ) ) }
1515 /> ,
1616 document . getElementById ( 'root' )
1717 ) ;
You can’t perform that action at this time.
0 commit comments