Skip to content

Commit

Permalink
correction de la pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-cailler committed Sep 3, 2020
1 parent 245e39d commit 9b4f340
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions src/components/section/Gallery/ImageSection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@ ImageSection.propTypes = {
onClickEvent: PropTypes.func
}

ImageSection.defaultProps = {
images: [],
onClickEvent: () => {},
};

export default ImageSection
4 changes: 2 additions & 2 deletions src/pages/GaleryPage/GaleryPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<React.StrictMode>
<h1 className="text-6xl leading-none font-semibold">Image</h1>
<ImagesGallerySection images={images} onClickEvent={(imageFromChild) => { setImagePreview(imageFromChild); }} />
<ImagesGallerySection images={images} onClickEvent={setImagePreview} />
<ImagePreview image={imagePreview} closePreview={() => { setImagePreview(null) }} />
</React.StrictMode>
);
Expand Down
2 changes: 1 addition & 1 deletion src/scss/grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9b4f340

Please sign in to comment.