Event details navigation

This commit is contained in:
Toralf Neby berge committed 2017-07-24 20:11:34 +02:00
1 parent 02c38ae6f2
commit 24cb9bddc0
6 files changed
+39 -3

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
import React, { Component } from 'react';
import {ScrollView, Text} from "react-native";
export default class EventDetails extends Component {
render() {
const item = this.props.item;
return (<ScrollView>
<Text>{item.link}</Text>
</ScrollView>)
}
}
+1 -1
View File
@@ -36,7 +36,7 @@ export default class EventList extends Component {
};
_onPressItem = (item) => {
Linking.openURL(item.link);
this.props.showEvent(item);
};
+5 -1
View File
@@ -99,8 +99,12 @@ class EventListContainer extends React.Component {
this.fetchEvents();
}
showEvent = (item) => {
this.props.showEvent(item);
};
render() {
return (<EventList {...{...this.state, handleRefresh: this.handleRefresh, handleLoadMore: this.handleLoadMore}} />)
return (<EventList showEvent={this.showEvent} {...{...this.state, handleRefresh: this.handleRefresh, handleLoadMore: this.handleLoadMore}} />)
}
}