@@ -79,8 +79,8 @@ const SelectInfo = () => {
7979 const [ name , setName ] = useState < string > ( "" ) ;
8080 const [ age , setAge ] = useState < string | null > ( null ) ;
8181 const [ gender , setGender ] = useState < string | null > ( null ) ;
82- const [ relationship , setRelationship ] = useState < string | null > ( null ) ;
83- const [ interest , setInterest ] = useState < string [ ] > ( [ ] ) ;
82+ const [ job , setJob ] = useState < string | null > ( null ) ;
83+ const [ freeSetting , setFreeSetting ] = useState < string > ( "" ) ;
8484 const [ toastMessage , setToastMessage ] = useState < string | null > ( null ) ;
8585
8686 useEffect ( ( ) => {
@@ -97,27 +97,15 @@ const SelectInfo = () => {
9797 const mbtiOptions = [ "E" , "N" , "F" , "P" , "I" , "S" , "T" , "J" ] ;
9898 const ageOptions = [ "10대" , "20대" , "30대 이상" ] ;
9999 const genderOptions = [ "여자" , "남자" ] ;
100- const relationshipOptions = [
101- "부모" ,
102- "자녀" ,
103- "친구" ,
104- "짝사랑" ,
105- "이별" ,
106- "연인" ,
107- "선생님" ,
108- "직장동료"
109- ] ;
110- const interestOptions = [
111- "연애" ,
112- "결혼" ,
113- "취미" ,
114- "사회생활" ,
115- "여행" ,
116- "운동" ,
117- "심리" ,
118- "뷰티/패션" ,
119- "음식" ,
120- "인간관계"
100+ const jobOptions = [
101+ "연습생" ,
102+ "아이돌" ,
103+ "스포츠선수" ,
104+ "배우" ,
105+ "작가" ,
106+ "스트리머" ,
107+ "유튜버" ,
108+ "프로게이머"
121109 ] ;
122110
123111 const handleMBTISelect = ( option : string ) => {
@@ -133,18 +121,8 @@ const SelectInfo = () => {
133121 return selectedMBTI [ group ] === option ;
134122 } ;
135123
136- const handleInterestSelect = ( option : string ) => {
137- if ( interest . includes ( option ) ) {
138- setInterest ( ( prevInterests ) =>
139- prevInterests . filter ( ( item ) => item !== option )
140- ) ;
141- } else {
142- setInterest ( ( prevInterests ) => [ ...prevInterests , option ] ) ;
143- }
144- } ;
145-
146- const isInterestSelected = ( option : string ) => {
147- return interest . includes ( option ) ;
124+ const handleFreeSettingChange = ( e : ChangeEvent < HTMLTextAreaElement > ) => {
125+ setFreeSetting ( e . target . value ) ;
148126 } ;
149127
150128 const handleNameChange = ( e : ChangeEvent < HTMLInputElement > ) => {
@@ -206,21 +184,21 @@ const SelectInfo = () => {
206184 const commonData = {
207185 gender : gender === "남자" ? "MALE" : gender === "여자" ? "FEMALE" : null ,
208186 mbti,
209- interests : interest
187+ freeSetting
210188 } ;
211189
212190 const selectedData = isVirtualFriend
213191 ? {
214192 ...commonData ,
215193 friendName : name ,
216194 age : mapAgeToNumber ( age ) ,
217- relationship
195+ job
218196 }
219197 : {
220198 ...commonData ,
221199 fastFriendName : name ,
222200 fastFriendAge : mapAgeToNumber ( age ) ,
223- fastFriendRelationship : relationship
201+ fastFriendJob : job
224202 } ;
225203
226204 const apiUrl = isVirtualFriend ? "api/virtual-friend" : "api/fast-friend" ;
@@ -387,43 +365,37 @@ const SelectInfo = () => {
387365 </ div >
388366 </ div >
389367
390- { /* 관계 선택 */ }
368+ { /* 직업 선택 */ }
391369 < div className = "pt-[20px] pb-[20px]" >
392370 < p className = "text-2lg leading-[24px] font-bold tracking-[0em] text-gray-600" >
393- 상대방과 나의 관계
371+ 직업
394372 </ p >
395373 < div className = "grid grid-cols-4 gap-[16px] pt-[16px]" >
396- { relationshipOptions . map ( ( option ) => (
374+ { jobOptions . map ( ( option ) => (
397375 < FormButton
398376 key = { option }
399377 size = "sm"
400- selected = { relationship === option }
401- onClick = { ( ) =>
402- handleButtonClick ( option , setRelationship , relationship )
403- }
378+ selected = { job === option }
379+ onClick = { ( ) => handleButtonClick ( option , setJob , job ) }
404380 >
405381 { option }
406382 </ FormButton >
407383 ) ) }
408384 </ div >
409385 </ div >
410386
411- { /* 관심사 선택 */ }
387+ { /* 자유 설정 */ }
412388 < div className = "pt-[20px] pb-[26px]" >
413389 < p className = "text-2lg leading-[24px] font-bold tracking-[0em] text-gray-600" >
414- 관심사
390+ 자유 설정
415391 </ p >
416- < div className = "grid grid-cols-4 gap-[16px] pt-[16px]" >
417- { interestOptions . map ( ( option ) => (
418- < FormButton
419- key = { option }
420- size = "sm"
421- selected = { isInterestSelected ( option ) }
422- onClick = { ( ) => handleInterestSelect ( option ) }
423- >
424- { option }
425- </ FormButton >
426- ) ) }
392+ < div className = "pt-[8px]" >
393+ < textarea
394+ value = { freeSetting }
395+ onChange = { handleFreeSettingChange }
396+ className = "h-[92px] w-full resize-none overflow-y-auto rounded-lg border border-gray-300 px-4 py-4 text-sm focus:border-primary-light focus:ring-primary-light focus:outline-none"
397+ placeholder = "상황, 상대방과의 관계, 세계관 등을 입력해주세요"
398+ />
427399 </ div >
428400 </ div >
429401 </ div >
0 commit comments