import React from "react"
import GridItem from "../GridItem"
import * as styles from "./styles.module.scss"

const Grid = ({ collection }) => {
  return (
    <ul className={styles.grid}>
      {collection.map(({ node }, index) => {
        return (
          <li className={styles.item} key={index}>
            <GridItem item={node} />
          </li>
        )
      })}
    </ul>
  )
}

export default Grid
