diff --git a/client/src/Components/HostedEvent/Event.js b/client/src/Components/HostedEvent/Event.js new file mode 100644 index 000000000..4f913c969 --- /dev/null +++ b/client/src/Components/HostedEvent/Event.js @@ -0,0 +1,99 @@ +import React from 'react' +import { Link } from 'react-router-dom' + +import { + Grid, Paper, + Typography, + Button +} from '@material-ui/core' +import { withStyles } from '@material-ui/core/styles' + +const styles = theme => ({ + root: { + flexGrow: 1, + padding: 20, + margin: 10 + }, + image: { + width: 128, + height: '100%', + cursor: 'default' + }, + img: { + margin: 'auto', + display: 'block', + maxWidth: '100%', + maxHeight: '100%' + + }, + buttonList: { + margin: theme.spacing.unit, + float: 'right' + }, + buttonGrid: { + marginTop: -20 + } + +}) + +class Event extends React.Component { + render () { + const classes = this.props.classes + const { + name, + designator, + startDatetime, + finishDatetime, + hostId, + description + } = this.props.event + return ( + + + + {name} + From : {startDatetime} + To : {finishDatetime} + + + Hosted by: {hostId} + Formula: + First prize: + + + + + Description : + {description} + + + + + + + + + + ) + } +} + +export default withStyles(styles)(Event) diff --git a/client/src/Components/HostedEvent/graphql.js b/client/src/Components/HostedEvent/graphql.js index 83b5882ce..2c1c73859 100644 --- a/client/src/Components/HostedEvent/graphql.js +++ b/client/src/Components/HostedEvent/graphql.js @@ -2,6 +2,11 @@ import gql from 'graphql-tag' const fragments = ` name + designator + startDatetime + finishDatetime + hostId + description ` export const HOSTS_HOSTEVENT = gql` diff --git a/client/src/Components/HostedEvent/index.js b/client/src/Components/HostedEvent/index.js index 9b45f4a65..46b4d95f9 100644 --- a/client/src/Components/HostedEvent/index.js +++ b/client/src/Components/HostedEvent/index.js @@ -14,6 +14,7 @@ import { withStyles } from '@material-ui/core/styles' import styles from './styles' import New from './New' +import Event from './Event' class HostedEvent extends React.Component { constructor (props) { @@ -43,9 +44,7 @@ class HostedEvent extends React.Component { if (error) return `Error! ${error.message}` const list = data.hosts_EventsByHost.map((event, index) => { return ( -
- {event.name} -
+ ) }) return (