File tree Expand file tree Collapse file tree 4 files changed +19
-13
lines changed
Expand file tree Collapse file tree 4 files changed +19
-13
lines changed Original file line number Diff line number Diff line change 1+ 'use client' ;
2+
13import { Icon } from '@/shared/icons' ;
24
35interface CourseInputSectionProps {
Original file line number Diff line number Diff line change 1+ 'use client' ;
2+
13import CommonButton from '@/shared/components/button/CommonButton' ;
24
35interface CourseSelectSectionProps {
@@ -13,7 +15,7 @@ export default function CourseSelectSection({
1315 selected,
1416 onSelect,
1517} : CourseSelectSectionProps ) {
16- const sectionId = `${ title . replace ( / \s + / g, '-' ) } -group` ;
18+ const sectionId = `${ ( title ?? '' ) . replace ( / \s + / g, '-' ) } -group` ;
1719
1820 return (
1921 < section
@@ -37,16 +39,17 @@ export default function CourseSelectSection({
3739 style = { { WebkitOverflowScrolling : 'touch' } }
3840 role = "list"
3941 >
40- { options . map ( ( { id, label } ) => (
41- < CommonButton
42- key = { id }
43- label = { label }
44- aria-pressed = { selected === id }
45- aria-label = { `${ label } 선택` }
46- role = "listitem"
47- variant = { selected === id ? 'active' : 'default' }
48- onClick = { ( ) => onSelect ( selected === id ? null : id ) }
49- />
42+ { Array . isArray ( options ) &&
43+ options . map ( ( { id, label } ) => (
44+ < CommonButton
45+ key = { id }
46+ label = { label }
47+ aria-pressed = { selected === id }
48+ aria-label = { `${ label } 선택` }
49+ role = "button"
50+ variant = { selected === id ? 'active' : 'default' }
51+ onClick = { ( ) => onSelect ( selected === id ? null : id ) }
52+ />
5053 ) ) }
5154 </ div >
5255
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { BottomNav } from '@/shared/components/tab/BottomNav';
55import { purposes , stays , moves } from '@/shared/constants/course/courseOptions' ;
66import { useCourseSelection } from '@/shared/hooks/useCourseSelection' ;
77import CourseSelectSection from '@/pages/map/components/CourseSelectSection' ;
8- import { useRouter } from 'next/navigation ' ;
8+ import { useRouter } from 'next/router ' ;
99import CourseInputSection from '@/pages/map/components/CourseInputSection' ;
1010
1111export default function CourseSettingPage ( ) {
@@ -17,7 +17,7 @@ export default function CourseSettingPage() {
1717
1818 const handleNext = ( ) => {
1919 if ( ! canProceed ) return alert ( '모든 항목을 선택해주세요.' ) ;
20- router . push ( '/map/ result' ) ;
20+ router . push ( '/result' ) ;
2121 } ;
2222
2323 return (
Original file line number Diff line number Diff line change @@ -2,3 +2,4 @@ export { default as Header } from './header/Header';
22export { default as ControlBar } from './header/ControlBar' ;
33export { default as Tag } from './tag/Tag' ;
44export { DatePicker } from './datePicker/DatePicker' ;
5+ export { default as CommonButton } from './button/CommonButton' ;
You can’t perform that action at this time.
0 commit comments