Skip to content

Commit

Permalink
[refactor] preview theme 추가 및 persistentList -> immutableList
Browse files Browse the repository at this point in the history
allGenderAgeGroups 는 변경되지 않음
  • Loading branch information
easyhooon committed Sep 1, 2024
1 parent 253c279 commit a5516fc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.tripmate.android.feature.recruit.component
package com.tripmate.android.feature.mate_recruit.component

import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Row
Expand All @@ -16,6 +16,7 @@ import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.unit.dp
import com.tripmate.android.core.designsystem.ComponentPreview
import com.tripmate.android.core.designsystem.theme.Medium16_Reg
import com.tripmate.android.core.designsystem.theme.TripmateTheme
import com.tripmate.android.feature.mate_recruit.R

@Composable
Expand Down Expand Up @@ -58,11 +59,13 @@ fun MateRecruitCheckBox(
@ComponentPreview
@Composable
fun MateRecruitCheckBoxPreview() {
MateRecruitCheckBox(
text = "니와 비슷한 유형의 동행 찾기",
isSelected = false,
onSelectedChange = {},
iconRes = R.drawable.ic_mate_type_checked,
checkedIconRes = R.drawable.ic_mate_type,
)
TripmateTheme {
MateRecruitCheckBox(
text = "니와 비슷한 유형의 동행 찾기",
isSelected = false,
onSelectedChange = {},
iconRes = R.drawable.ic_mate_type_checked,
checkedIconRes = R.drawable.ic_mate_type,
)
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package com.tripmate.android.feature.recruit.viewmodel
package com.tripmate.android.feature.mate_recruit.viewmodel

import com.tripmate.android.core.common.extension.formatToDate
import com.tripmate.android.core.common.extension.formatToTime
import com.tripmate.android.domain.entity.GenderAgeGroupEntity
import com.tripmate.android.feature.mate_recruit.R
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.PersistentList
import kotlinx.collections.immutable.persistentListOf
import java.time.LocalDate
Expand All @@ -20,7 +21,7 @@ data class MateRecruitUiState(
val mateRecruitTime: String = LocalTime.now(ZoneId.of("Asia/Seoul")).formatToTime(),
val isMateRecruitTimeUpdated: Boolean = false,
val selectedMateType: MateType = MateType.ALL,
val allGenderAgeGroups: PersistentList<GenderAgeGroupEntity> = persistentListOf(
val allGenderAgeGroups: ImmutableList<GenderAgeGroupEntity> = persistentListOf(
GenderAgeGroupEntity(id = 1, textResId = R.string.same_gender, isSelected = false),
GenderAgeGroupEntity(id = 2, textResId = R.string.same_age, isSelected = false),
GenderAgeGroupEntity(id = 3, textResId = R.string.no_matter, isSelected = false),
Expand Down

0 comments on commit a5516fc

Please sign in to comment.