From 9b4f340fab25025f7ca5948af99c5b1bdd02c198 Mon Sep 17 00:00:00 2001 From: lulmairine Date: Thu, 3 Sep 2020 15:17:02 +0200 Subject: [PATCH] correction de la pull request --- .../layout/layout-container/LayoutContainerWork.jsx | 2 +- src/components/section/Gallery/ImageSection.jsx | 5 +++++ src/pages/GaleryPage/GaleryPage.jsx | 4 ++-- src/scss/grid.scss | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/layout/layout-container/LayoutContainerWork.jsx b/src/components/layout/layout-container/LayoutContainerWork.jsx index 6438c5f..a9309b8 100644 --- a/src/components/layout/layout-container/LayoutContainerWork.jsx +++ b/src/components/layout/layout-container/LayoutContainerWork.jsx @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import classNames from 'classnames'; import {NavbarMain, NavbarWork} from "../../navigation"; -const LayoutContainerWork = ({children, className, match}) => { +const LayoutContainerWork = ({children, className}) => { const classes = classNames( "w-11/12 mr-auto flex", diff --git a/src/components/section/Gallery/ImageSection.jsx b/src/components/section/Gallery/ImageSection.jsx index bda8631..cd44e43 100644 --- a/src/components/section/Gallery/ImageSection.jsx +++ b/src/components/section/Gallery/ImageSection.jsx @@ -22,4 +22,9 @@ ImageSection.propTypes = { onClickEvent: PropTypes.func } +ImageSection.defaultProps = { + images: [], + onClickEvent: () => {}, +}; + export default ImageSection diff --git a/src/pages/GaleryPage/GaleryPage.jsx b/src/pages/GaleryPage/GaleryPage.jsx index c174fe9..c44d766 100644 --- a/src/pages/GaleryPage/GaleryPage.jsx +++ b/src/pages/GaleryPage/GaleryPage.jsx @@ -3,11 +3,11 @@ import {images} from "../../constants/data"; import {ImagePreview, ImagesGallerySection} from "../../components/section"; const GaleryPage = () => { - const [imagePreview, setImagePreview] = useState(null) + const [imagePreview, setImagePreview] = useState() return (

Image

- { setImagePreview(imageFromChild); }} /> + { setImagePreview(null) }} />
); diff --git a/src/scss/grid.scss b/src/scss/grid.scss index 1d5cc6e..4233627 100644 --- a/src/scss/grid.scss +++ b/src/scss/grid.scss @@ -6,7 +6,7 @@ padding: 45px 0; display: grid; grid-template-columns: repeat(4, auto); - // grid-template-rows: repeat(4, auto); + // grid-template-rows: repeat(4, auto); grid-gap: 2vh; grid-auto-flow: dense; }