@@ -24,18 +24,21 @@ import com.yapp.ndgl.data.travel.model.ProgramType
2424import com.yapp.ndgl.feature.home.R
2525import com.yapp.ndgl.feature.home.component.TravelTemplate
2626import com.yapp.ndgl.feature.home.model.TravelContent
27+ import com.yapp.ndgl.feature.home.model.TravelProgramTab
2728import com.yapp.ndgl.feature.home.util.toIconRes
2829import kotlinx.collections.immutable.toPersistentList
30+ import com.yapp.ndgl.core.ui.R as CoreR
2931
3032private const val COLUMN_ITEM_COUNT = 3
3133
3234@Composable
3335internal fun PopularTravelSection (
34- tabs : List <HomeState . TravelProgramTab >,
36+ tabs : List <TravelProgramTab >,
3537 selectedTabIndex : Int ,
3638 travels : List <TravelContent >,
3739 onTabSelected : (Int ) -> Unit ,
3840 onTravelClick : (Long ) -> Unit ,
41+ onTravelMoreClick : () -> Unit ,
3942) {
4043 Column (
4144 modifier = Modifier .fillMaxWidth(),
@@ -61,7 +64,7 @@ internal fun PopularTravelSection(
6164 NDGLOutlinedButton (
6265 status = NDGLOutlinedButtonAttr .Status .ACTIVE ,
6366 label = stringResource(R .string.home_popular_travel_more_button),
64- onClick = {} ,
67+ onClick = onTravelMoreClick ,
6568 modifier = Modifier
6669 .fillMaxWidth()
6770 .padding(horizontal = 24 .dp),
@@ -71,7 +74,7 @@ internal fun PopularTravelSection(
7174
7275@Composable
7376private fun HorizontalCardSection (
74- tabs : List <HomeState . TravelProgramTab >,
77+ tabs : List <TravelProgramTab >,
7578 selectedTabIndex : Int ,
7679 travels : List <TravelContent >,
7780 onTabSelected : (Int ) -> Unit ,
@@ -87,11 +90,12 @@ private fun HorizontalCardSection(
8790 NDGLChipTab (
8891 tabs = tabs.map { tab ->
8992 when (tab) {
90- HomeState . TravelProgramTab .All -> NDGLChipTabAttr .Tab (
93+ TravelProgramTab .All -> NDGLChipTabAttr .Tab (
9194 tag = " All" ,
92- name = " 전체 " ,
95+ name = stringResource( CoreR .string.common_all) ,
9396 )
94- is HomeState .TravelProgramTab .Custom -> NDGLChipTabAttr .Tab (
97+
98+ is TravelProgramTab .Custom -> NDGLChipTabAttr .Tab (
9599 tag = tab.programId.toString(),
96100 name = tab.name,
97101 leadingIcon = tab.type.toIconRes(),
@@ -185,13 +189,13 @@ private fun PopularTravelSectionPreview() {
185189 NDGLTheme {
186190 PopularTravelSection (
187191 tabs = listOf (
188- HomeState . TravelProgramTab .All ,
189- HomeState . TravelProgramTab .Custom (
192+ TravelProgramTab .All ,
193+ TravelProgramTab .Custom (
190194 programId = 1 ,
191195 name = " 빠니보틀" ,
192196 type = ProgramType .YOUTUBE ,
193197 ),
194- HomeState . TravelProgramTab .Custom (
198+ TravelProgramTab .Custom (
195199 programId = 2 ,
196200 name = " 곽튜브" ,
197201 type = ProgramType .TV ,
@@ -201,6 +205,7 @@ private fun PopularTravelSectionPreview() {
201205 travels = sampleTravels,
202206 onTabSelected = {},
203207 onTravelClick = {},
208+ onTravelMoreClick = {},
204209 )
205210 }
206211}
0 commit comments