File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -18,14 +18,14 @@ store.dispatch(setAccessToken('1234'));
18
18
19
19
class TodoList extends React . Component {
20
20
componentWillMount ( ) {
21
- store . dispatch ( readEndpoint ( 'events/1 ' ) ) ;
21
+ store . dispatch ( readEndpoint ( 'todos ' ) ) ;
22
22
}
23
23
24
24
render ( ) {
25
25
return (
26
26
< ul >
27
- { this . props . events . data . map ( event => (
28
- < li key = { event . id } > { event . id } </ li >
27
+ { this . props . todos . data . map ( todo => (
28
+ < li key = { todo . id } > { todo . description } </ li >
29
29
) ) }
30
30
</ ul >
31
31
) ;
@@ -35,8 +35,8 @@ class TodoList extends React.Component {
35
35
36
36
const mapStateToProps = ( state ) => {
37
37
console . log ( state )
38
- const events = state . api . events || { data : [ ] } ;
39
- return { events }
38
+ const todos = state . api . todos || { data : [ ] } ;
39
+ return { todos }
40
40
} ;
41
41
42
42
const ApiResults = connect (
You can’t perform that action at this time.
0 commit comments