import React from 'react'; import { withRouter, Link } from 'react-router-dom'; import PropTypes from 'prop-types'; class PagedCombatLog extends React.Component { constructor(props) { super(props); this.state = { data: {} } if (props.getFetch) { props.getFetch(this.fetchCombatLog.bind(this)); } } render() { return (
When
Attacker
Defender
Attacking Force
Defending Force
Undefended?
Victor
Gold Lost
Victor Casualties
{ this.parseDate(this.state.data[key].eventTime) }
{this.state.data[key].attackerUsername}
{this.state.data[key].defenderUsername}
{this.state.data[key].attackingUnits}
{this.state.data[key].defendingUnits}
{this.state.data[key].undefended ? 'yes' : 'no'}
{this.state.data[key].victor}
{this.state.data[key].spoilsGold}
{this.state.data[key].casualtiesVictor}