File tree Expand file tree Collapse file tree
src/common/component/JobDropDown Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ const JobDropDown = () => {
3636 < IcDropdown className = { dropdownIcon ( { state } ) } />
3737 </ button >
3838
39- { isOpen && < JobList selectedJob = { selectedJob } onSelect = { handleJob } /> }
39+ { isOpen && < JobList jobList = { JOB_LIST } selectedJob = { selectedJob } onSelect = { handleJob } /> }
4040 { isTextOpen && < input placeholder = "정보를 입력해주세요" className = { textContainer } /> }
4141 </ >
4242 ) ;
Original file line number Diff line number Diff line change 11import { listContainer , listItem , listText } from '@/common/component/JobDropDown/JobList.css' ;
2- import { JOB_LIST } from '@/common/component/JobDropDown/constants/job' ;
32import type { JobType , JobValue } from '@/common/component/JobDropDown/constants/job' ;
43
54type JobProps = {
5+ jobList : JobType [ ] ;
66 selectedJob : JobValue ;
77 onSelect : ( type : JobType ) => void ;
88} ;
99
10- const JobList = ( { selectedJob, onSelect } : JobProps ) => {
10+ const JobList = ( { jobList , selectedJob, onSelect } : JobProps ) => {
1111 return (
1212 < div className = { listContainer } >
13- { JOB_LIST . map ( ( job : JobType ) => {
13+ { jobList . map ( ( job : JobType ) => {
1414 const state = selectedJob === job ? 'selected' : 'default' ;
1515
1616 return (
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ export const JOB_LIST = [
77 { id : 6 , job : '사업가' } ,
88 { id : 7 , job : '운동선수' } ,
99 { id : 8 , job : '기타 (직접 작성)' } ,
10- ] as const ;
10+ ] ;
1111
1212export const PLACE_HOLDER = '직업을 선택하세요' as const ;
1313
You can’t perform that action at this time.
0 commit comments