Skip to content

Commit

Permalink
add images for heroes on teams
Browse files Browse the repository at this point in the history
  • Loading branch information
howardchung committed Feb 17, 2017
1 parent 8597f8c commit aba99f6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/components/Matches/index.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* global API_HOST */
import React from 'react';
import { connect } from 'react-redux';
import Helmet from 'react-helmet';
Expand All @@ -12,6 +13,7 @@ import matchStyles from 'components/Match/Match.css';
import Match from 'components/Match';
import TabBar from 'components/TabBar';
import styles from './Matches.css';
import heroes from 'dotaconstants/build/heroes.json';

const matchesColumns = [{
displayName: strings.th_match_id,
Expand Down Expand Up @@ -59,6 +61,16 @@ const publicMatchesColumns = [
sortFn: true,
displayFn: transformations.duration,
},
{
displayName: <span className={matchStyles.teamIconContainer} ><IconRadiant className={matchStyles.iconRadiant} />{strings.general_radiant}</span>,
field: 'radiant_team',
displayFn: (row, col, field) => (field || '').split(',').map(heroId => <img style={{ width: '50px' }} src={`${API_HOST}${heroes[heroId].img}`} />),
},
{
displayName: <span className={matchStyles.teamIconContainer} ><IconDire className={matchStyles.iconDire} />{strings.general_dire}</span>,
field: 'dire_team',
displayFn: (row, col, field) => (field || '').split(',').map(heroId => <img style={{ width: '50px' }} src={`${API_HOST}${heroes[heroId].img}`} />),
}
];

const matchTabs = [{
Expand Down
1 change: 1 addition & 0 deletions src/lang/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@
"th_party_mmr": "Party MMR",
"th_estimated_mmr": "Estimated MMR",
"th_permanent_buffs": "Buffs",
"th_winner": "Winner",

"ward_log_type": "Type",
"ward_log_owner": "Owner",
Expand Down

0 comments on commit aba99f6

Please sign in to comment.