Commit 850f20a6 authored by AuckeBos's avatar AuckeBos
Browse files

Added onclick method for events in Calendar

parent 4959f26e
export function openEvent(eventId) {
return null;
}
import React from 'react';
import { View, Text } from 'react-native';
import { connect } from 'react-redux';
import { openEvent } from '../actions/event';
const Event = (event) =>
<View>
......@@ -7,7 +9,17 @@ const Event = (event) =>
<Text> {new Date(event.start).toISOString().substring(0, 10)}</Text>
<i>{event.description}</i>
<Text>-----------------------------------------</Text>
onPress={() => openEvent(event.id)}
</View>
;
Event.propTypes = {
openEvent: React.PropTypes.func.isRequired,
};
const mapDispatchToProps = dispatch => ({
openEvent: () => dispatch(openEvent()),
});
export default connect(() => ({}), mapDispatchToProps)(Event);
export default Event;
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment