File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed
Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,9 @@ const SelectInfo = () => {
5656 ? testResultMBTI
5757 : undefined ;
5858
59+ const confirmButtonText =
60+ type === "fastFriend" ? "대화 시작하기" : "친구 저장하기" ;
61+
5962 const [ selectedMBTI , setSelectedMBTI ] = useState < {
6063 [ key : string ] : string | null ;
6164 } > ( {
@@ -152,7 +155,7 @@ const SelectInfo = () => {
152155 setTimeout ( ( ) => setToastMessage ( null ) , 3000 ) ;
153156 } ;
154157
155- const handleStartChat = async ( ) => {
158+ const handleConfirmButton = async ( ) => {
156159 const isMBTIComplete = Object . values ( selectedMBTI ) . every (
157160 ( val ) => val !== null
158161 ) ;
@@ -201,16 +204,9 @@ const SelectInfo = () => {
201204 if ( type === "virtualFriend" && isVirtualFriendResponse ( responseData ) ) {
202205 trackEvent ( "Click" , {
203206 page : "친구 저장" ,
204- element : "대화 시작하기"
205- } ) ;
206- navigate ( "/chat" , {
207- state : {
208- mbti,
209- mode : type ,
210- id : responseData . conversationId ,
211- name : responseData . virtualFriendName
212- }
207+ element : "친구 저장하기"
213208 } ) ;
209+ navigate ( "/" ) ;
214210 } else if ( type === "fastFriend" && typeof responseData === "number" ) {
215211 trackEvent ( "Click" , {
216212 page : "빠른 대화 설정" ,
@@ -372,9 +368,9 @@ const SelectInfo = () => {
372368 { /* 대화 시작 버튼 */ }
373369 < button
374370 className = "my-[22px] h-[60px] w-full rounded-[8px] bg-primary-normal font-bold text-white"
375- onClick = { handleStartChat }
371+ onClick = { handleConfirmButton }
376372 >
377- 대화 시작하기
373+ { confirmButtonText }
378374 </ button >
379375 </ div >
380376 </ div >
You can’t perform that action at this time.
0 commit comments