diff --git a/client/src/components/commons/ProgressiveImage/ProgressiveImage.tsx b/client/src/components/commons/ProgressiveImage/ProgressiveImage.tsx index 177faff2..12b8a9c0 100644 --- a/client/src/components/commons/ProgressiveImage/ProgressiveImage.tsx +++ b/client/src/components/commons/ProgressiveImage/ProgressiveImage.tsx @@ -1,6 +1,9 @@ -import React from "react"; +import React, { useCallback, useContext } from "react"; import useImageIntersect from "@/hooks/useImageIntersect"; +import useCommonModalStore from "@/store/useCommonModalStore"; +import ReviewModal from "@/components/main/Modal/ReviewModal/ReviewModal"; +import { PostContext } from "@/components/main/PostScroll/Post/Post"; interface ProgressiveImageProps { className: string; @@ -20,12 +23,19 @@ const ProgressiveImage = ({ alt, }: ProgressiveImageProps): JSX.Element => { const { observeImage } = useImageIntersect(); + const { id: postId, code, language } = useContext(PostContext); + const [openModal] = useCommonModalStore((state) => [state.openModal]); + + const handleOpenReviewModal = useCallback(() => { + openModal(); + }, [openModal]); return (