diff --git a/components/theme/memberCard.js b/components/theme/memberCard.js index 4905f61..e07629e 100644 --- a/components/theme/memberCard.js +++ b/components/theme/memberCard.js @@ -14,36 +14,17 @@ const MemberCard = ({ profilePic, }) => (
- - {profilePic ? ( - avatar - ) : githubUsername ? ( - avatar - ) : ( - + avatar - )} + alt={firstName + ' ' + lastName + `'s photo`} + />
{tag}
{' '} diff --git a/pages/members/index.js b/pages/members/index.js index 29aee66..e39fb95 100644 --- a/pages/members/index.js +++ b/pages/members/index.js @@ -8,7 +8,7 @@ import TitleBar from '../../components/theme/titleBar'; import dataFetch from '../../utils/dataFetch'; import ReactLoading from 'react-loading'; import CookieConsent from '../../components/cookieConsent'; -import memebers from '../../utils/members.json'; +// import memebers from '../../utils/members.json'; const query = ` query { activeUsers(sort: "username") { @@ -38,7 +38,7 @@ export default class Index extends React.Component { }; } - // fetchData = async () => await dataFetch({ query }); + fetchData = async () => await dataFetch({ query }); goTop = () => { window.scrollTo(0, 0); @@ -65,9 +65,11 @@ export default class Index extends React.Component { } componentDidMount() { - this.setState({ - data: memebers, - loaded: true, + this.fetchData().then((r) => { + this.setState({ + data: r.data.activeUsers, + loaded: true, + }); }); }