Skip to content

Commit

Permalink
fix: Fix the query that retrieves team data
Browse files Browse the repository at this point in the history
  • Loading branch information
AnisioMandlate committed Feb 16, 2021
1 parent 826c3ca commit 9901cb9
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 54 deletions.
11 changes: 11 additions & 0 deletions .docz/app/db.json
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,17 @@
}
]
},
{
"key": "src/components/Team/team.jsx",
"value": [
{
"description": "",
"displayName": "Team",
"methods": [],
"actualName": "Team"
}
]
},
{
"key": "src/components/About Card/index.jsx",
"value": [
Expand Down
7 changes: 7 additions & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ module.exports = {
},
},
`gatsby-transformer-sharp`,
`gatsby-transformer-yaml`,
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/src/data`,
},
},
`gatsby-plugin-sharp`,
{
resolve: `gatsby-plugin-manifest`,
Expand Down
26 changes: 26 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"gatsby-source-filesystem": "^2.10.0",
"gatsby-theme-docz": "^2.3.1",
"gatsby-transformer-sharp": "^2.11.0",
"gatsby-transformer-yaml": "^2.11.0",
"prop-types": "^15.7.2",
"react": "^16.12.0",
"react-dom": "^16.12.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/About Card/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const AboutCards = ({ teamMember }) => {
fixed={teamMember.image.childImageSharp.fixed}
className={styles.image}
/>
<h3 className={styles["card-title"]}>{teamMember.name}</h3>
<h3 className={styles.cardTitle}>{teamMember.name}</h3>
<p className={styles["card-subtitle"]}>{teamMember.role}</p>
</div>
)
Expand Down
10 changes: 6 additions & 4 deletions src/components/About Card/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
.card {
min-height: 500px;
min-height: 270px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
background-color: #1729318f;
border-radius: 10px;
padding: 20px;
border-radius: 16px;
padding: 40px 20px;
filter: drop-shadow(2px, 4px 12px rgba(0, 0, 0, 0.15));
}

.image {
/* max-width: 100px; */
border-radius: 50%;
}

.card-title {
.cardTitle {
margin-top: 15px;
font-size: 24px;
font-weight: 600;
}
4 changes: 2 additions & 2 deletions src/components/Team/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.cardsHolder {
margin-top: 20px;
margin-top: 60px;
display: grid;
gap: 16px;
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
21 changes: 10 additions & 11 deletions src/components/Team/team.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ const Team = () => {
query {
allTeamYaml {
edges {
name
role
image {
childImageSharp {
fixed(width: 100) {
...GatsbyImageSharpFixed_tracedSVG
node {
name
role
image {
childImageSharp {
fixed(width: 175) {
...GatsbyImageSharpFixed_tracedSVG
}
}
}
}
Expand All @@ -32,11 +34,8 @@ const Team = () => {
{edges.map((teamMember, key) => {
return <AboutCards key={key} teamMember={teamMember.node} />
})}
{/* <AboutCards
imageSrc={image}
name="Anisio Mandlate"
role="Software developer"
/> */}
</div>
)
}

export default Team
31 changes: 2 additions & 29 deletions src/pages/about-us.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import React from "react"
// import { Link } from "gatsby"

import styles from "../styles/about-us.module.css"
import Layout from "../components/Layout"
import SEO from "../components/SEO/seo"
import image from "../images/payments-logo.png"
import AboutCards from "../components/About Card"
import Team from "../components/Team/team"

const AboutUs = () => (
<Layout>
Expand All @@ -30,33 +29,7 @@ const AboutUs = () => (

<section className={styles.team}>
<h1>The Team</h1>
{/* <div className={styles.cardsHolder}>
<AboutCards
imageSrc={image}
name="Anisio Mandlate"
role="Software developer"
/>
<AboutCards
imageSrc={image}
name="Anisio Mandlate"
role="Software developer"
/>
<AboutCards
imageSrc={image}
name="Anisio Mandlate"
role="Software developer"
/>
<AboutCards
imageSrc={image}
name="Anisio Mandlate"
role="Software developer"
/>
<AboutCards
imageSrc={image}
name="Anisio Mandlate"
role="Software developer"
/>
</div> */}
<Team />
</section>
</Layout>
)
Expand Down
7 changes: 0 additions & 7 deletions src/styles/about-us.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,3 @@
.team h1 {
text-align: center;
}

/* .cardsHolder {
margin-top: 20px;
display: grid;
gap: 16px;
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
} */

0 comments on commit 9901cb9

Please sign in to comment.