Skip to content
Permalink
Browse files

update lightbox eg

  • Loading branch information...
neptunian committed Jun 22, 2019
1 parent f4a2310 commit 25dc7828363888b1e46b142c3c1a6144670f7c17
Showing with 2 additions and 2 deletions.
  1. +2 −2 examples/src/ExampleWithLightbox.js
@@ -7,8 +7,8 @@ function ExampleWithLightbox({ photos }) {
const [currentImage, setCurrentImage] = useState(0);
const [viewerIsOpen, setViewerIsOpen] = useState(false);

const openLightbox = useCallback((event, obj) => {
setCurrentImage(obj.index);
const openLightbox = useCallback((event, { photo, index }) => {
setCurrentImage(index);
setViewerIsOpen(true);
}, []);

0 comments on commit 25dc782

Please sign in to comment.
You can’t perform that action at this time.