| 
1 | 1 | "use client";  | 
2 |  | -import Image from "next/image";  | 
3 |  | -import styled from "styled-components";  | 
4 |  | -import PopularQuestions from "./PopularQuestion";  | 
 | 2 | +import { SendChatMessageRequest } from "@/chat/apis/sendChatMessage";  | 
5 | 3 | import LinkIcon from "@/shared/assets/icons/link.svg";  | 
6 | 4 | import ColorStar from "@/shared/assets/icons/tarot-card-result-color-star.svg";  | 
7 | 5 | import Star from "@/shared/assets/icons/tarot-card-result-star.svg";  | 
8 | 6 | import CatWithCard from "@/shared/assets/images/cardWithCat.png";  | 
9 |  | -import NextRecommendQuestion from "./NextRecommendQuestion";  | 
10 | 7 | import Button from "@/shared/components/Button";  | 
11 | 8 | import Toast from "@/shared/components/Toast";  | 
12 | 9 | import { checkBrowserForWebShare } from "@/shared/utils/checkBrowserForWebShare";  | 
13 | 10 | import shareLink from "@/shared/utils/shareLink";  | 
14 | 11 | import { useTarotReadingResult } from "@/tarot/hooks/useTarotReadingResult";  | 
15 | 12 | import findCardById from "@/tarot/utils/findCardById";  | 
16 | 13 | import { useQueryClient } from "@tanstack/react-query";  | 
17 |  | -import { useParams, useRouter } from "next/navigation";  | 
 | 14 | +import Image from "next/image";  | 
 | 15 | +import { useParams, usePathname, useRouter } from "next/navigation";  | 
18 | 16 | import { useEffect, useState } from "react";  | 
19 |  | -import { SendChatMessageRequest } from "@/chat/apis/sendChatMessage";  | 
20 |  | -import { usePathname } from "next/navigation";  | 
 | 17 | +import styled from "styled-components";  | 
21 | 18 | import { useTarotReviewExist } from "../hooks/useTarotReviewExist";  | 
 | 19 | +import NextRecommendQuestion from "./NextRecommendQuestion";  | 
 | 20 | +import PopularQuestions from "./PopularQuestion";  | 
22 | 21 | 
 
  | 
23 |  | -import TarotReadingReviewModal from "./TarotReadingReviewModal";  | 
24 | 22 | import { useRef } from "react";  | 
 | 23 | +import TarotReadingReviewModal from "./TarotReadingReviewModal";  | 
25 | 24 | const TarotResultAfterView = () => {  | 
26 | 25 |   const { resultId, chatId } = useParams<{  | 
27 | 26 |     resultId: string;  | 
@@ -73,7 +72,7 @@ const TarotResultAfterView = () => {  | 
73 | 72 |     const observer = new IntersectionObserver(  | 
74 | 73 |       (entries) => {  | 
75 | 74 |         if (entries[0].isIntersecting) {  | 
76 |  | -          if (reviewExist !== undefined) {  | 
 | 75 | +          if (reviewExist !== undefined && data?.isOwner) {  | 
77 | 76 |             setReviewModalOpen(!reviewExist.hasReviewed);  | 
78 | 77 |           }  | 
79 | 78 |           observer.disconnect(); // 한 번 실행 후 감지 중지  | 
 | 
0 commit comments