From 323835834c93245e326f4158ec0183a37a6ecce9 Mon Sep 17 00:00:00 2001 From: Nikola Bjelo Date: Tue, 30 Oct 2018 08:14:05 +0100 Subject: [PATCH] Adding a path and components for a show page --- client/src/Components/Event/Show/index.js | 42 ++++++++++++++++++++++ client/src/Components/Event/Show/styles.js | 4 +++ client/src/index.js | 1 + 3 files changed, 47 insertions(+) create mode 100644 client/src/Components/Event/Show/index.js create mode 100644 client/src/Components/Event/Show/styles.js diff --git a/client/src/Components/Event/Show/index.js b/client/src/Components/Event/Show/index.js new file mode 100644 index 000000000..d0e89c9d6 --- /dev/null +++ b/client/src/Components/Event/Show/index.js @@ -0,0 +1,42 @@ +import React from 'react' +import { Query } from 'react-apollo' + +import Typography from '@material-ui/core/Typography' +import { withStyles } from '@material-ui/core/styles' + +import styles from './styles' + +import { showEventCalls } from '../../../GraphQL/Calls/index' + +class Show 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)(Show) diff --git a/client/src/Components/Event/Show/styles.js b/client/src/Components/Event/Show/styles.js new file mode 100644 index 000000000..175dc52e5 --- /dev/null +++ b/client/src/Components/Event/Show/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 a03f99fe7..dcaad35f6 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -43,6 +43,7 @@ class App extends Component { +