Skip to content

Commit

Permalink
Merge pull request #1 from fbuireu/main
Browse files Browse the repository at this point in the history
Missing nested node in image sharp fixed
  • Loading branch information
knupel committed Nov 18, 2020
2 parents a413424 + e279937 commit a58a7d9
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions src/pages/image_grid_specific_folder.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ const img_grid_style = {
gridTemplateColumns: `repeat(auto-fill, 200px)`,
}

export default ({ data }) => (
<div>
export default ({ data }) => {
return <div>
<Layout title="IMAGE GRID FROM SPECIFIC FOLDER"></Layout>
<div style={img_grid_style}>
{data.allFile.edges.map(edge => (
<Img fluid={edge.node.fluid} />
{data.allFile.edges.map(({ node }) => (
<Img fluid={node.childImageSharp.fluid} />
))}
</div>
</div>
)
}

export const query = graphql`
query {
Expand Down Expand Up @@ -78,38 +78,38 @@ export const query = graphql`
// }

/*
{
allFile(filter: { sourceInstanceName: { eq: "champImages" } }) {
edges {
node {
extension
relativePath
childImageSharp {
fluid {
...GatsbyImageSharpFluid
}
}
}
}
}
}
*/
{
allFile(filter: { sourceInstanceName: { eq: "champImages" } }) {
edges {
node {
extension
relativePath
childImageSharp {
fluid {
...GatsbyImageSharpFluid
}
}
}
}
}
}
*/
/*
export const query = graphql`
query {
allImageSharp(filter: { id: { regex: "/media/" } }) {
edges {
node {
id
fluid(maxWidth: 200, maxHeight: 200) {
...GatsbyImageSharpFluid
}
}
}
}
}
`
*/
export const query = graphql`
query {
allImageSharp(filter: { id: { regex: "/media/" } }) {
edges {
node {
id
fluid(maxWidth: 200, maxHeight: 200) {
...GatsbyImageSharpFluid
}
}
}
}
}
`
*/

// query HeaderQuery {
// exampleImage: file(
Expand Down

1 comment on commit a58a7d9

@knupel
Copy link
Owner Author

@knupel knupel commented on a58a7d9 Nov 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx a lot.. that's awesome like say the guy from the other side of the ocean !!!!

Please sign in to comment.