Event details navigation
This commit is contained in:
1 parent
02c38ae6f2
commit
24cb9bddc0
6 files changed
+39
-3
No files matched your search
@@ -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>)
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@ export default class EventList extends Component {
|
||||
};
|
||||
|
||||
_onPressItem = (item) => {
|
||||
Linking.openURL(item.link);
|
||||
this.props.showEvent(item);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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}} />)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user