diff --git a/client/src/Components/Event/Edit/index.js b/client/src/Components/Event/Edit/index.js new file mode 100644 index 000000000..0bc8a1cf6 --- /dev/null +++ b/client/src/Components/Event/Edit/index.js @@ -0,0 +1,58 @@ +import React from 'react' +import gql from 'graphql-tag' +import { Query } from 'react-apollo' + +import Typography from '@material-ui/core/Typography' +import { withStyles } from '@material-ui/core/styles' + +import styles from './styles' + +const HOSTS_EVENT = gql` + query Hosts_Event($designator: ID!){ + hosts_Event(designator: $designator) { + name + designator + startDatetime + finishDatetime + host { + alias + firstName + lastName + } + description + } + } +` + +class Edit extends React.Component { + render () { + return ( + + + Enroll in an competition {this.props.match.params.slug} + + + {({ loading, error, data }) => { + if (loading) return 'Loading...' + if (error) return `Error! ${error.message}` + return ( +

+ {data.hosts_Event.description} +

+ ) + }} +
+
+ ) + } +} + +export default withStyles(styles)(Edit) diff --git a/client/src/Components/Event/Edit/styles.js b/client/src/Components/Event/Edit/styles.js new file mode 100644 index 000000000..175dc52e5 --- /dev/null +++ b/client/src/Components/Event/Edit/styles.js @@ -0,0 +1,4 @@ +const styles = theme => ({ +}) + +export default styles diff --git a/client/src/index.js b/client/src/index.js index c8ab94cbd..a03f99fe7 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -9,6 +9,7 @@ import { getItem } from './utils/local-storage' import TopBar from './Components/TopBar' import Search from './Components/Search' import HostedEvents from './Components/HostedEvents' +import EditEvent from './Components/Event/Edit' class App extends Component { constructor (props) { @@ -41,6 +42,7 @@ class App extends Component { {loggedIn} +