import * as React from "react"; import { View, StyleSheet, Dimensions, Image, ScrollView, Text, Button, TouchableOpacity, ImageBackground } from "react-native"; import { Divider, Icon, Avatar } from "react-native-elements"; import { TabView, TabBar, SceneMap } from "react-native-tab-view"; import { RkButton, RkCard, RkText, RkTheme } from "react-native-ui-kitten"; import Timeline from "react-native-timeline-feed"; import * as Progress from "react-native-progress"; import NavAbsolute from "../components/Nav"; import { connect } from "react-redux"; import { bindActionCreators } from "redux"; import * as Actions from "../store/actions"; //Import your actionss import Swiper from "react-native-swiper"; const SCREEN_HEIGHT = Dimensions.get("window").height; const SCREEN_WIDTH = Dimensions.get("window").width; import FitImage from "react-native-fit-image"; import MapView, { PROVIDER_GOOGLE } from "react-native-maps"; const formatObj = obj => { let a = {}; a.push({}); return a; }; class calendarDetail extends React.Component { static navigationOptions = ({ navigation }) => ({ header: ( ) }); state = {}; componentDidMount() { this.props.getEvents(this.props.user); console.log("didMount"); console.log(this.props.events); const { navigation } = this.props; const info = navigation.getParam("info", "error"); console.log("putas"); console.log(info); } _update = () => { this.setState({ user: this.props.user }); console.log(this.props.events); }; constructor(props) { super(props); this.data = []; } renderHeader = info => { return ( ); }; renderDescription = info => { return ( {info.time === info.timeEnd ? info.time : `${info.time}H - ${info.timeEnd}H`} {info.name} Workshop {info.Enrolled} / {info.MaxAttendees} André Duarte Project manager at ubiwhere website Descrição do orador: Existem muitas variações das passagens do Lorem Ipsum disponíveis, mas a maior parte sofreu alterações de alguma forma, pela injecção de humor, ou de palavras aleatórias que nem sequer parecem suficientemente credíveis.{" "} Descrição da palestra/workshop {info.description} ); }; /* renderMap = () => { return ( { console.log(region); }} /> ) }; */ renderAttendee = () => { return ( Nome do gajo navigation.goBack(null)} color="#000" iconStyle={styles.icon} underlayColor="transparent" underlineColorAndroid="transparent" containerStyle={styles.iconContainer} hitSlop={{ top: 15, bottom: 15, left: 15, right: 15 }} /> ); }; render() { const { navigation } = this.props; const info = navigation.getParam("info", "error"); return ( {this.renderHeader(info)} {this.renderDescription(info)} Localização ); } } const styles = StyleSheet.create({ block: { marginTop: 15, backgroundColor: "white", padding: 20, shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.25, shadowRadius: 3.84, elevation: 3 }, AttendeeContainer: { flexDirection: "row", height: 55, justifyContent: "center", marginLeft: 10, marginRight: 10 }, centerRow: { alignItems: "center", backgroundColor: "transparent", flex: 3, flexDirection: "column", justifyContent: "center" }, leftRow: { backgroundColor: "transparent", flex: 1, flexDirection: "row", justifyContent: "flex-start", alignSelf: "center" }, rightRow: { alignItems: "flex-end", backgroundColor: "transparent", flex: 2, flexDirection: "row", justifyContent: "flex-end", marginRight: 4, alignSelf: "center" }, icon: { justifyContent: "flex-start", marginTop: 2.8 }, nameAttendee: { alignSelf: "center", fontSize: 20, fontWeight: "400", color: "#000", marginBottom: 10 }, details: { marginTop: 20, flex: 1, alignSelf: "center" }, infoRow: { margin: 25 }, ramoText: { alignSelf: "flex-start", marginBottom: 5, color: "white", fontSize: 17, fontWeight: "400" }, timeText: { alignItems: "flex-end", flex: 2, lineHeight: 10, marginRight: 20 }, mainViewStyle: { flex: 1, flexGrow: 1, flexDirection: "column" }, scroll: { backgroundColor: "#eee", flex: 1 //marginBottom: 55, }, header: { flex: 1, padding: 10, backgroundColor: "white", borderRadius: 0, shadowColor: "#000", shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.25, shadowRadius: 3.84, elevation: 3 }, cardContainer: { flex: 1, padding: 10, // margin: 20, backgroundColor: "white", borderRadius: 5 }, headerContainer: { flex: 1 }, container: { flex: 1, flexDirection: "column" }, coverContainer: { position: "relative" }, coverImage: { height: Dimensions.get("window").width * (2 / 4), width: Dimensions.get("window").width }, /*headerContainer: { alignItems: 'center', backgroundColor: '#FFF', },*/ carreerPathContainer: { backgroundColor: "#CC1A17", height: 50, flex: 1, alignItems: "center", justifyContent: "center", paddingTop: 15 }, carreerPathText: { height: 50, color: "white", fontWeight: "bold", fontSize: 20 }, companyHeader: { backgroundColor: "#dddddd", // height:150, borderRadius: 5, margin: 10, padding: 10 }, companyTitle: { paddingBottom: 5, fontWeight: "bold", color: "#777777", fontSize: 17 // padding:20 }, companyLogo: { borderRadius: 20 }, wrapper: {}, company: { flex: 1, flexDirection: "row", // backgroundColor:'red', color: "black" }, companyLogoContainer: { flex: 1, justifyContent: "center", width: "60%", // backgroundColor:'white', margin: 20 }, aboutCompany: { width: SCREEN_WIDTH, flex: 1, justifyContent: "center", alignItems: "center" } }); function mapStateToProps(state, props) { return { token: state.apiReducer.token, user: state.apiReducer.user, logged: state.apiReducer.logged, events: state.apiReducer.events, careerPath: state.apiReducer.careerPath }; } function mapDispatchToProps(dispatch) { return bindActionCreators(Actions, dispatch); } export default connect( mapStateToProps, mapDispatchToProps )(calendarDetail);