text: import React from "react"
  import { useStaticQuery, graphql } from "gatsby"
  import Img from "gatsby-image"
  import "./image.css"
  
  
  const Image = () => {
    const data = useStaticQuery(graphql`
    query MyQuery {
      allFile(filter: {extension: {regex: "/(jpg)|(png)|(jpeg)/"}, 
        name: {nin: ["background", "background2"]}
      }
      ) {
        edges {
          node {
            base
            childImageSharp {
              fluid(maxHeight:600, maxWidth: 600){
                ...GatsbyImageSharpFluid
            }
          }
        }
      }
    }
  }
    `)
    return (
      <div className="image-container">
        <h1>
        Voir nos Destinations</h1>
        <div className="image-grid">
        {data.allFile.edges.map((image, key)=> (
          <Img key= {key}
          className="image-item"
          fluid={image.node.childImageSharp.fluid}
          alt={image.node.base.split('.')[0]}
        />))}
        </div>
      </div>
    )
  }
  
  export default Image
  