import React from 'react'; import { Link } from 'react-router-dom'; import { Mutation } from 'react-apollo'; import { Grid, Paper, Typography, Button, } from '@material-ui/core'; import { withStyles } from '@material-ui/core/styles'; import styles from './styles'; import { hostedEventsCalls } from '../../GraphQL/Calls/index'; import { toLocalTime } from '../../utils'; class Event extends React.Component { render() { const { classes, showOnly, event } = this.props; const { id, title, subtitle, startDatetime, endDatetime, host, formula, description, } = event; return ( {title} {subtitle} From : {toLocalTime(startDatetime)} To : {toLocalTime(endDatetime)} Description : {description} Hosted by: {host.alias} ({host.lastName} {host.firstName}) Formula: {formula.name} { !showOnly ? { window.location.reload(); }} > {publishEvent => ( )} : '' } ); } } export default withStyles(styles)(Event);