diff --git a/client/src/Components/Search/Tabs/Future.js b/client/src/Components/Search/Tabs/Future.js
new file mode 100644
index 000000000..1cedbe9af
--- /dev/null
+++ b/client/src/Components/Search/Tabs/Future.js
@@ -0,0 +1,24 @@
+import React from 'react'
+import { Typography } from '@material-ui/core'
+
+import { withStyles } from '@material-ui/core/styles'
+import styles from '../styles'
+
+class Future extends React.Component {
+ render () {
+ const classes = this.props.classes
+ return (
+
+ Future competitions
+
+ )
+ }
+}
+
+export default withStyles(styles)(Future)
diff --git a/client/src/Components/Search/Tabs/History.js b/client/src/Components/Search/Tabs/History.js
new file mode 100644
index 000000000..b457947fb
--- /dev/null
+++ b/client/src/Components/Search/Tabs/History.js
@@ -0,0 +1,24 @@
+import React from 'react'
+import { Typography } from '@material-ui/core'
+
+import { withStyles } from '@material-ui/core/styles'
+import styles from '../styles'
+
+class History extends React.Component {
+ render () {
+ const classes = this.props.classes
+ return (
+
+ Your old competitions (maybe here, maybe not, who knows)
+
+ )
+ }
+}
+
+export default withStyles(styles)(History)
diff --git a/client/src/Components/Search/Tabs/Incoming.js b/client/src/Components/Search/Tabs/Incoming.js
new file mode 100644
index 000000000..fa3dfc3b7
--- /dev/null
+++ b/client/src/Components/Search/Tabs/Incoming.js
@@ -0,0 +1,24 @@
+import React from 'react'
+import { Typography } from '@material-ui/core'
+
+import { withStyles } from '@material-ui/core/styles'
+import styles from '../styles'
+
+class Incoming extends React.Component {
+ render () {
+ const classes = this.props.classes
+ return (
+
+ Ongoing and incoming competitions
+
+ )
+ }
+}
+
+export default withStyles(styles)(Incoming)
diff --git a/client/src/Components/Search/Tabs/Past.js b/client/src/Components/Search/Tabs/Past.js
new file mode 100644
index 000000000..4c953f7cb
--- /dev/null
+++ b/client/src/Components/Search/Tabs/Past.js
@@ -0,0 +1,24 @@
+import React from 'react'
+import { Typography } from '@material-ui/core'
+
+import { withStyles } from '@material-ui/core/styles'
+import styles from '../styles'
+
+class Past extends React.Component {
+ render () {
+ const classes = this.props.classes
+ return (
+
+ This will come later
+
+ )
+ }
+}
+
+export default withStyles(styles)(Past)
diff --git a/client/src/Components/Search/Tabs/index.js b/client/src/Components/Search/Tabs/index.js
new file mode 100644
index 000000000..a4077c1ac
--- /dev/null
+++ b/client/src/Components/Search/Tabs/index.js
@@ -0,0 +1,11 @@
+import Future from './Future'
+import History from './History'
+import Incoming from './Incoming'
+import Past from './Past'
+
+export {
+ Future,
+ History,
+ Incoming,
+ Past
+}
diff --git a/client/src/Components/Search/index.js b/client/src/Components/Search/index.js
index b4fcffc86..0bc4c4e19 100644
--- a/client/src/Components/Search/index.js
+++ b/client/src/Components/Search/index.js
@@ -16,6 +16,12 @@ import styles from './styles'
import { listEventsCalls } from '../../GraphQL/Calls/index'
+import {
+ Future,
+ History,
+ Incoming,
+ Past
+} from './Tabs'
import Event from './Event'
function TabContainer (props) {
@@ -27,8 +33,11 @@ function TabContainer (props) {
}
class Search extends React.Component {
- state = {
- value: 0
+ constructor (props) {
+ super(props)
+ this.state = {
+ value: 0
+ }
}
handleChange = (event, value) => {
@@ -39,72 +48,61 @@ class Search extends React.Component {
const classes = this.props.classes
const { value } = this.state
return (
-
-
-
-
- }
- />
- }
- />
- }
- />
- }
- />
-
-
- {value === 0 &&
hahah
}
- {value === 1 &&
hoho
}
- {value === 2 &&
hihi
}
- {value === 3 &&
hehe
}
-
-
- Enroll in an competition
-
-
- {({ loading, error, data }) => {
- if (loading) return 'Loading...'
- if (error) return `Error! ${error.message}`
- const list = data.hosts_Events.map((event, index) => {
- return (
-
- )
- })
+
+ {({ loading, error, data }) => {
+ if (loading) return 'Loading...'
+ if (error) return `Error! ${error.message}`
+ const list = data.hosts_Events.map((event, index) => {
return (
-
- { list }
-
+
)
- }}
-
-
+ })
+ return (
+
+
+
+
+ }
+ />
+ }
+ />
+ }
+ />
+ }
+ />
+
+
+ {value === 0 &&
}
+ {value === 1 &&
}
+ {value === 2 &&
}
+ {value === 3 &&
}
+
+ { list }
+
+ )
+ }}
+
)
}
}