@@ -6,7 +6,7 @@ import LinkIcon from "@/shared/assets/icons/link.svg";
66import  ColorStar  from  "@/shared/assets/icons/tarot-card-result-color-star.svg" ; 
77import  Star  from  "@/shared/assets/icons/tarot-card-result-star.svg" ; 
88import  CatWithCard  from  "@/shared/assets/images/cardWithCat.png" ; 
9- 
9+ import   NextRecommendQuestion   from   "./NextRecommendQuestion" ; 
1010import  Button  from  "@/shared/components/Button" ; 
1111import  Toast  from  "@/shared/components/Toast" ; 
1212import  {  checkBrowserForWebShare  }  from  "@/shared/utils/checkBrowserForWebShare" ; 
@@ -16,7 +16,8 @@ import findCardById from "@/tarot/utils/findCardById";
1616import  {  useQueryClient  }  from  "@tanstack/react-query" ; 
1717import  {  useParams ,  useRouter  }  from  "next/navigation" ; 
1818import  {  useState  }  from  "react" ; 
19- // import NextRecommendQuestion from "./NextRecommendQuestion"; 
19+ import  {  SendChatMessageRequest  }  from  "@/chat/apis/sendChatMessage" ; 
20+ import  {  usePathname  }  from  "next/navigation" ; 
2021
2122const  TarotResultAfterView  =  ( )  =>  { 
2223  const  {  resultId,  chatId }  =  useParams < { 
@@ -25,7 +26,9 @@ const TarotResultAfterView = () => {
2526  } > ( ) ; 
2627
2728  const  [ toastOpen ,  setToastOpen ]  =  useState ( false ) ; 
28-   const  shareURL  =  process . env . NEXT_PUBLIC_BASE_URL  ||  "https://tarotnyang.me" ; 
29+   const  pathname  =  usePathname ( ) ; 
30+   console . log ( pathname ) ; 
31+   const  shareURL  =  process . env . NEXT_PUBLIC_BASE_URL  +  pathname  ||  "https://tarotnyang.me" ; 
2932  const  {  handleWebShare,  handleCopyToClipboard }  =  shareLink ( shareURL ) ; 
3033  const  router  =  useRouter ( ) ; 
3134  const  {  data,  isError }  =  useTarotReadingResult ( Number ( resultId ) ) ; 
@@ -43,17 +46,16 @@ const TarotResultAfterView = () => {
4346    router . push ( `/chats/${ chatId }  ` ) ; 
4447  } ; 
4548
46-   // const handleRecommendQuestionChat = (recommendQuestionId: number, message: string) => { 
47-   //   const object: SendChatMessageRequest = { 
48-   //     roomId: Number(chatId), 
49-   //     referenceQuestionId: recommendQuestionId, 
50-   //     intent: "RECOMMEND_QUESTION", 
51-   //     message: message, 
52-   //   }; 
49+   const  handleRecommendQuestionChat  =  ( message : string )  =>  { 
50+     const  object : SendChatMessageRequest  =  { 
51+       roomId : Number ( chatId ) , 
52+       intent : "NORMAL" , 
53+       message : message , 
54+     } ; 
5355
54-   //    queryClient.invalidateQueries({ queryKey: ["chatMessages"] });
55-   //    router.push(`/chats/${chatId}?message=${JSON.stringify(object)}`);
56-   //  };
56+     queryClient . invalidateQueries ( {  queryKey : [ "chatMessages" ]  } ) ; 
57+     router . push ( `/chats/${ chatId }  ?message=${ JSON . stringify ( object ) }  ` ) ; 
58+   } ; 
5759
5860  const  handleNewChat  =  ( )  =>  { 
5961    router . push ( "/" ) ; 
@@ -186,14 +188,14 @@ const TarotResultAfterView = () => {
186188            </ Button > 
187189          ) } 
188190        </ NextQuestionFlow > 
189-         { /* {/ <Divider /> */ } 
191+         < Divider  /> 
190192
191-         { /* { data?.isOwner ? (
193+         { data ?. isOwner  ? ( 
192194          < > 
193195            < NextRecommendQuestion  handleRecommendQuestionChat = { handleRecommendQuestionChat }  /> 
194196            < Divider  /> 
195197          </ > 
196-         ) : null} */  } 
198+         )  : null } 
197199
198200        < PopularQuestions  /> 
199201      </ TarotResultWrapper > 
@@ -367,6 +369,16 @@ const TarotResultWrapper = styled.div`
367369  margin-inline: auto; 
368370  background-color: white; 
369371` ; 
372+ 
373+ const  Divider  =  styled . div ` 
374+   height: 11px; 
375+   width: calc(100% + 44px * 2); 
376+ 
377+   margin: 44px 0 44px 0; 
378+   background-color: ${ ( {  theme } )  =>  theme . colors . grey10 }  ; 
379+ 
380+   overflow: hidden; 
381+ ` ; 
370382// const DownloadInfoWrapper = styled.div` 
371383//   display: flex; 
372384//   flex-direction: column; 
0 commit comments