diff --git a/src/Screens/TimelineScreen.js b/src/Screens/TimelineScreen.js index e8cafcf..2cd9c2c 100644 --- a/src/Screens/TimelineScreen.js +++ b/src/Screens/TimelineScreen.js @@ -18,16 +18,13 @@ export class TimelineScreen extends React.Component { } fetchTimeline = () => { - - this.props.api - .fetchTimeline() - .then(timeline => { - this.setState({ timeline }); - }); + this.props.api.fetchTimeline().then(({ statuses }) => { + this.setState({ timeline: statuses }); + }); }; handleTweetPress = id => { - console.log('handlePress => ', id); + console.log("handlePress => ", id); /* - navigate to `TWEET_DETAIL_SCREEN` passing the id as a param */ @@ -36,7 +33,7 @@ export class TimelineScreen extends React.Component { - create a TweetItem component with this API: this.handleTweetPress(item.id_str)} /> */ - renderItem = ({ item }) => null + renderItem = ({ item }) => null; render() { const { timeline } = this.state; @@ -45,9 +42,7 @@ export class TimelineScreen extends React.Component { {timeline.length == 0 ? ( ) : ( - - {JSON.stringify(timeline, null, 4)} - + {JSON.stringify(timeline, null, 4)} )} );