Skip to content

Commit

Permalink
[feat] 이미지 클릭 액션 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
014967 committed Oct 2, 2023
1 parent 5b20339 commit 1f7a07d
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ fun HistoryDetailRoute(
commitNo: Int,
historyViewModel: HistoryViewModel,
onClickBackButton: () -> Unit,
onClickImage: (String) -> Unit,
) {
Log.i("HistoryDetailRoute", "commitNo = $commitNo")
val lifecycleOwner = LocalLifecycleOwner.current
Expand All @@ -46,15 +47,17 @@ fun HistoryDetailRoute(
}
val state by historyViewModel.collectAsState()
HistoryDetailScreen(
onClickBackButton = onClickBackButton,
historyDetailInfoUiModel = state.historyDetailInfoUiModel,
onClickBackButton = onClickBackButton,
onClickImage = onClickImage,
)
}

@Composable
fun HistoryDetailScreen(
onClickBackButton: () -> Unit,
historyDetailInfoUiModel: HistoryDetailInfoUiModel,
onClickBackButton: () -> Unit = {},
onClickImage: (String) -> Unit = {},
) {
val scrollableState = rememberScrollState()

Expand Down Expand Up @@ -98,7 +101,10 @@ fun HistoryDetailScreen(
.fillMaxWidth()
.padding(vertical = 24.dp)
.aspectRatio(1f)
.clip(TwoTooTheme.shape.extraSmall),
.clip(TwoTooTheme.shape.extraSmall).clickable {
onClickImage(historyDetailInfoUiModel.infoUiModel.photoUrl)
},

)
Text(
text = historyDetailInfoUiModel.challengeName,
Expand Down

0 comments on commit 1f7a07d

Please sign in to comment.