diff --git a/client/src/App.js b/client/src/App.js index 241fa8d1b..652531151 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -20,6 +20,7 @@ import { Footer, Callback, Home, + About, Dashboard, Teams, theme, @@ -149,6 +150,7 @@ class App extends Component { + ({ + '@global': { + body: { + backgroundColor: theme.palette.common.white + } + }, + layout: { + width: 'auto', + marginLeft: theme.spacing.unit * 3, + marginRight: theme.spacing.unit * 3, + [theme.breakpoints.up(900 + theme.spacing.unit * 3 * 2)]: { + width: 900, + marginLeft: 'auto', + marginRight: 'auto' + } + }, + heroContent: { + maxWidth: 600, + margin: '0 auto', + padding: `${theme.spacing.unit * 8}px 0 ${theme.spacing.unit * 6}px` + } +}) + +const About = ({ classes }) => ( + + +
+
+ + Collaborate. Innovate. Evolve. + + + Welcome to the Advanced Algos Teams Module + +
+
+
+) + +About.propTypes = { + classes: PropTypes.object.isRequired +} + +export default withStyles(styles)(About) diff --git a/client/src/views/dashboard/TeamMembers.js b/client/src/views/dashboard/TeamMembers.js index a22de3714..8b2b43aeb 100644 --- a/client/src/views/dashboard/TeamMembers.js +++ b/client/src/views/dashboard/TeamMembers.js @@ -4,7 +4,7 @@ import PropTypes from 'prop-types' import Typography from '@material-ui/core/Typography' import { withStyles } from '@material-ui/core/styles' -import { TeamTable } from './components/TeamTable' +import { MessageCard } from '../common/' const styles = theme => ({ tableContainer: { @@ -18,7 +18,7 @@ const TeamMembers = ({ classes }) => ( Members
- +
) diff --git a/client/src/views/dashboard/components/DashTeamItem.js b/client/src/views/dashboard/components/DashTeamItem.js index 1de33a7a4..b5210e73c 100644 --- a/client/src/views/dashboard/components/DashTeamItem.js +++ b/client/src/views/dashboard/components/DashTeamItem.js @@ -51,9 +51,6 @@ export const DashTeamItem = ({ classes, team }) => ( Members:6 - - Now recruiting! - - Delete Team Team - - DANGER - Deleting your team cannot be undone - Are you sure you want to delete this team? - {loader} - {errors} - - - - - +
+ Delete Team Team + + DANGER - Deleting your team cannot be undone + Are you sure you want to delete this team? + {loader} + {errors} + + + + + +
) @@ -127,4 +140,4 @@ ManageTeamDelete.propTypes = { authId: PropTypes.string.isRequired } -export default withRouter(ManageTeamDelete) +export default withStyles(styles)(ManageTeamDelete) diff --git a/client/src/views/dashboard/components/ManageTeamDetails.js b/client/src/views/dashboard/components/ManageTeamDetails.js index b9420b564..183db0ea8 100644 --- a/client/src/views/dashboard/components/ManageTeamDetails.js +++ b/client/src/views/dashboard/components/ManageTeamDetails.js @@ -1,5 +1,6 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' +import { withStyles } from '@material-ui/core/styles' import Button from '@material-ui/core/Button' import DetailsIcon from '@material-ui/icons/Details' @@ -9,6 +10,17 @@ import DialogContent from '@material-ui/core/DialogContent' import DialogTitle from '@material-ui/core/DialogTitle' import Typography from '@material-ui/core/Typography' +const styles = theme => ({ + dialogContainer: { + display: 'block', + margin: '3em', + minWidth: 400 + }, + buttonRight: { + justifyContent: 'flex-end' + } +}) + export class ManageTeamDetails extends Component { constructor (props) { super(props) @@ -34,44 +46,46 @@ export class ManageTeamDetails extends Component { onClose={this.handleClose} aria-labelledby='form-dialog-title' > - {name} Team Details - - - {name} - - - {createdAt} - - - Motto: {profile.motto} - - - Description: {profile.description} - - - Members: {members.length} - - - Team Admin: - { - members.map(member => { - if (member.role === 'OWNER' || member.role === 'ADMIN') { - return member.member.alias - } - }) - } - - - - - +
+ {name} Team Details + + + {name} + + + {createdAt} + + + Motto: {profile.motto} + + + Description: {profile.description} + + + Members: {members.length} + + + Team Admin: + { + members.map(member => { + if (member.role === 'OWNER' || member.role === 'ADMIN') { + return member.member.alias + } + }) + } + + + + + +
) @@ -91,4 +105,4 @@ ManageTeamDetails.propTypes = { team: PropTypes.any } -export default ManageTeamDetails +export default withStyles(styles)(ManageTeamDetails) diff --git a/client/src/views/dashboard/components/ManageTeamEdit.js b/client/src/views/dashboard/components/ManageTeamEdit.js index 92def9d44..7db8b46be 100644 --- a/client/src/views/dashboard/components/ManageTeamEdit.js +++ b/client/src/views/dashboard/components/ManageTeamEdit.js @@ -1,7 +1,7 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -import { withRouter } from 'react-router-dom' import { Mutation } from 'react-apollo' +import { withStyles } from '@material-ui/core/styles' import Button from '@material-ui/core/Button' import EditIcon from '@material-ui/icons/Edit' @@ -20,6 +20,17 @@ import GET_TEAMS_BY_OWNER from '../../../graphql/teams/GetTeamsByOwnerQuery' import { checkGraphQLError } from '../../../utils/graphql-errors' +const styles = theme => ({ + dialogContainer: { + display: 'block', + margin: '3em', + minWidth: 400 + }, + buttonRight: { + justifyContent: 'flex-end' + } +}) + export class ManageTeamEdit extends Component { constructor (props) { super(props) @@ -29,8 +40,8 @@ export class ManageTeamEdit extends Component { this.handleChange = this.handleChange.bind(this) this.handleSubmit = this.handleSubmit.bind(this) console.log('ManageTeamEdit', props.team) - const motto = props.team.profile.motto - const description = props.team.profile.description + const motto = props.team.profile.motto || '' + const description = props.team.profile.description || '' this.state = { open: false, motto: motto, @@ -40,7 +51,7 @@ export class ManageTeamEdit extends Component { render () { console.log(this.props, this.props.slug) - const { authId } = this.props + const { classes, team, authId } = this.props return ( - - Edit Team Details - - Team Creation - Team Motto: - - Team description: - - {loader} - {errors} - - - - - +
+ Edit Team Details + + + + Team description: + + {loader} + {errors} + + + + + +
) @@ -161,4 +182,4 @@ ManageTeamEdit.propTypes = { team: PropTypes.object } -export default withRouter(ManageTeamEdit) +export default withStyles(styles)(ManageTeamEdit) diff --git a/client/src/views/dashboard/components/ManageTeamsItem.js b/client/src/views/dashboard/components/ManageTeamsItem.js index 8552bfaf5..378dde27e 100644 --- a/client/src/views/dashboard/components/ManageTeamsItem.js +++ b/client/src/views/dashboard/components/ManageTeamsItem.js @@ -30,9 +30,9 @@ export const ManageTeamsItem = ({ classes, team, authId }) => ( - - - + + + diff --git a/client/src/views/dashboard/settings.js b/client/src/views/dashboard/settings.js index a9ee58b58..d28df4d79 100644 --- a/client/src/views/dashboard/settings.js +++ b/client/src/views/dashboard/settings.js @@ -4,7 +4,7 @@ import PropTypes from 'prop-types' import Typography from '@material-ui/core/Typography' import { withStyles } from '@material-ui/core/styles' -import { TeamTable } from './components/TeamTable' +import { MessageCard } from '../common/' const styles = theme => ({ tableContainer: { @@ -18,7 +18,7 @@ export const Settings = ({ classes }) => ( Settings
- +
) diff --git a/client/src/views/footer/index.js b/client/src/views/footer/index.js index a7abff6b7..ecbd0c594 100644 --- a/client/src/views/footer/index.js +++ b/client/src/views/footer/index.js @@ -55,26 +55,28 @@ const Footer = ({ classes }) => { Home - + Teams - + About - - Support - - +
+ + Support + + + Documentation - + Telegram diff --git a/client/src/views/index.js b/client/src/views/index.js index 6759b33df..8ff455e85 100644 --- a/client/src/views/index.js +++ b/client/src/views/index.js @@ -2,9 +2,10 @@ import NavBar from './navbar' import Footer from './footer' import Callback from './callback' import Home from './home' +import About from './about' import Dashboard from './dashboard' import Teams from './teams' import { theme, globalStyles } from './theme' -export { NavBar, Footer, Callback, Home, Dashboard, Teams, theme, globalStyles } +export { NavBar, Footer, Callback, Home, About, Dashboard, Teams, theme, globalStyles }