/** * TournamentRow.js * * That row that displays tournament info. * * @copyright Ryan McGrath 2018. */ import React from 'react'; import {Image, Text, View, TouchableOpacity, Dimensions} from 'react-native'; import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; import styles from '../../styles'; const width = Dimensions.get('window').width; export default class TournamentRow extends React.Component { onPress = () => { this.props.onTap(this.props.tournament); } render() { const x = width - 32; const w = {width: x, height: 130}; //x * this.props.tournament.memeleePromoImage.ratio}; return ( {this.props.tournament.name} {this.props.tournament.memeleeTournamentRange} {this.props.tournament.hasOnlineEvents && (!this.props.tournament.city || this.props.tournament.city === '') ? 'Online' : (this.props.tournament.city ? this.props.tournament.city + ', ' : '') + (this.props.tournament.addrState ? this.props.tournament.addrState : '')} {this.props.tournament.memeleeEventsCount} Events {this.props.tournament.attendeeCount} Attendees ); } }