diff --git a/src/components/Figure/Lightbox.js b/src/components/Figure/Lightbox.js index cbac0dae1..26d9c08cf 100644 --- a/src/components/Figure/Lightbox.js +++ b/src/components/Figure/Lightbox.js @@ -52,8 +52,7 @@ const Lightbox = ({ nodeData, ...rest }) => { const [open, setOpen] = useState(false); const figureWidth = nodeData.options?.figwidth || 'auto'; const openModal = useCallback(() => { - setOpen(!open); - // eslint-disable-next-line react-hooks/exhaustive-deps + setOpen((prevOpen) => !prevOpen); }, []); return (