Skip to content

Commit

Permalink
#23 create MatchItem.js
Browse files Browse the repository at this point in the history
  • Loading branch information
circleGiven committed Jan 19, 2019
1 parent c6e52df commit 34421d3
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions spomatch-frontend/src/component/Match/MatchItem.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import React from 'react';
import {Typography} from "@material-ui/core";
import Grid from '@material-ui/core/Grid';
import withStyles from "@material-ui/core/styles/withStyles";

const styles = theme => ({
title: {
textAlign: 'center'
},
home: {
textAlign: 'center'
},
away: {
textAlign: 'center'
}
});

const MatchItem = ({classes, match}) => {
return (
<div>
{/* HOME team */}
<Grid className={classes.home}>
<Typography className={classes.title}>HOME</Typography>
<Typography>{match.homeTeam}</Typography>
</Grid>
{/* Match info */}
<Grid className={classes.home}>{team.home}
{/* 경기 날짜 */}
<Typography>{match.date}</Typography>
{/* 경기 시간 */}
<Typography>{match.time}</Typography>
{/* 경기 장소 */}
<Typography>{match.place}</Typography>
</Grid>
{/* AWAY info */}
<Grid className={classes.away}>
<Typography className={classes.title}>AWAY</Typography>
<Typography>{match.awayTeam}</Typography>
</Grid>
</div>
);
};
export default withStyles(styles)(MatchItem);

0 comments on commit 34421d3

Please sign in to comment.