diff --git a/client/src/components/EditProfile.js b/client/src/components/EditProfile.js index 0d762df5..f04fe93c 100644 --- a/client/src/components/EditProfile.js +++ b/client/src/components/EditProfile.js @@ -220,7 +220,7 @@ class EditProfile extends Component { checkProfanity = () => { var profanityExists = false; const profanities = Object.keys(this.state).map((key) => { - if (typeof(this.state[key]) === "string") { + if (typeof(this.state[key]) === "string" && key != "name") { const k = `${key}_profane` const isProfane = this.profanityFilter.isProfane(this.state[key]) this.setState({[k]: isProfane}) diff --git a/client/src/components/Members.js b/client/src/components/Members.js index 12c8b1b5..7ea557ee 100644 --- a/client/src/components/Members.js +++ b/client/src/components/Members.js @@ -8,31 +8,12 @@ import "./css/Members.css"; import environment from "./Environment"; import { Link } from "react-router-dom"; -// edit this query to pull on the team members -const getUsersQuery = graphql` - query MembersQuery { - user_profile { - team { - members { - name - school - grad_year - contact - skills - experience - } - } - } - } -`; - class Members extends Component { render() { let memberCards = []; // sample users array let users = []; - console.log("Team: " + this.props.members); if (this.props.members) { users = this.props.members; } @@ -47,11 +28,12 @@ class Members extends Component { name={user.name} grad_year={user.grad_year} school={user.school} - contact={user.contact} + contact={user.email} skills={user.skills.filter(function(el) { return Boolean(el); })} experience={user.experience} + slackid={user.slackid} /> ); } diff --git a/client/src/components/MembersBlank.js b/client/src/components/MembersBlank.js index 90a73cf7..a763b997 100644 --- a/client/src/components/MembersBlank.js +++ b/client/src/components/MembersBlank.js @@ -46,11 +46,12 @@ class Members extends Component { name={user.name} grad_year={user.grad_year} school={user.school} - contact={user.contact} + contact={user.email} skills={user.skills.filter(function(el) { return Boolean(el); })} experience={user.experience} + slackid={user.slackid} /> ); } diff --git a/client/src/components/TeamCard.js b/client/src/components/TeamCard.js index 8361dbb4..6919c16f 100644 --- a/client/src/components/TeamCard.js +++ b/client/src/components/TeamCard.js @@ -1,79 +1,100 @@ -import React, { Component } from 'react'; -import { Button, Card, Popup, Container, Label, TextArea, Placeholder } from 'semantic-ui-react'; -import JoinTeam from './ui_subcomponents/JoinTeam'; -import './css/TeamCard.css'; +import React, { Component } from "react"; +import { + Button, + Card, + Popup, + Container, + Label, + TextArea, + Placeholder, +} from "semantic-ui-react"; +import JoinTeam from "./ui_subcomponents/JoinTeam"; +import "./css/TeamCard.css"; import { Link, useParams } from "react-router-dom"; class TeamCard extends Component { - constructor(props) { - super(props) - this.state = { - showModal: false - } - } - closeModal = () => { - console.log("close individual") - this.setState({ showModal: false }); + constructor(props) { + super(props); + this.state = { + showModal: false, }; - render() { - // let contact; - // contact = } - // content="Team has been joined!" - // on='click' - // hideOnScroll - // /> - var colors = [ - 'violet', - 'yellow', - 'orange' - ] - var count = 0; - var skill; - // var viewskill; - let link = "/team/" + this.props.id; - var colors = ["#A0CCC9", "#EBABCA"]; - var count = 0; - var viewskill = this.props.interests.map((skill) => ( - - )); - var button = this.props.team ? :