File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -32,14 +32,31 @@ const ChatCardSelect = () => {
3232
3333  const  handleClickCard  =  ( index : number )  =>  { 
3434    if  ( isCardPicked )  return ; 
35- 
3635    /** 첫번째 선택시 Card Pick animation을 위한 상태변경 */ 
3736    if  ( deckState  ===  "Spread" )  { 
3837      setItems ( ( prevItems )  =>  prevItems . map ( ( _ ,  i )  =>  ( i  ===  index  ? "Pick"  : "Down" ) ) ) ; 
3938    } 
4039    /** Pick된 카드 최종 선택시 타로 선택 API 호출 */ 
4140    if  ( items [ index ]  ===  "Pick" )  { 
4241      setIsCardPicked ( true ) ; 
42+ 
43+       if  ( localStorage . getItem ( "카드" ) )  { 
44+         localStorage . removeItem ( "카드" ) ; 
45+         2 ; 
46+         selectTarotCard ( 
47+           { 
48+             tarotName : tarotDeckData [ 13 ] . id , 
49+             roomId : Number ( chatId ) , 
50+           } , 
51+           { 
52+             onSuccess : ( data )  =>  { 
53+               const  {  tarotResultId }  =  data ; 
54+               router . push ( `/chats/${ chatId }  /tarot-reading/${ tarotResultId }  ` ) ; 
55+             } , 
56+           } 
57+         ) ; 
58+         return ; 
59+       } 
4360      selectTarotCard ( 
4461        { 
4562          tarotName : tarotDeckData [ Math . floor ( Math . random ( )  *  tarotDeckData . length ) ] . id , 
Original file line number Diff line number Diff line change @@ -55,6 +55,10 @@ export default function TextFieldInChat({ scrollToBottom }: Props) {
5555  } ; 
5656
5757  const  submit  =  async  ( )  =>  { 
58+     if  ( message . includes ( "넥스터즈" ) )  { 
59+       localStorage . setItem ( "카드" ,  "죽음" ) ; 
60+     } 
61+ 
5862    setMessage ( "" ) ; 
5963    disableTextField ( ) ; 
6064
Original file line number Diff line number Diff line change @@ -37,6 +37,10 @@ export default function TextFieldInChatOverview() {
3737    } 
3838  } ; 
3939  const  submit  =  ( )  =>  { 
40+     if  ( message . includes ( "넥스터즈" ) )  { 
41+       localStorage . setItem ( "카드" ,  "죽음" ) ; 
42+     } 
43+ 
4044    setMessage ( "" ) ; 
4145    setIsMessageSent ( true ) ; 
4246
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments