Skip to content

Commit

Permalink
[MOD/#304] 이벤트 이름 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
leeeyubin committed Dec 17, 2024
1 parent 4883285 commit c388c49
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ import kotlinx.coroutines.delay

@Composable
fun StartFilteringRoute(
onButtonClick: () -> Unit,
onTextClick: () -> Unit,
onStartClick: () -> Unit,
onLaterClick: () -> Unit,
viewModel: StartFilteringViewModel = hiltViewModel()
) {
val state by viewModel.state.collectAsStateWithLifecycle()
Expand All @@ -58,23 +58,23 @@ fun StartFilteringRoute(
}

StartFilteringScreen(
onButtonClick = {
onButtonClick()
onStartClick = {
onStartClick()
amplitudeTracker.track(
type = EventType.CLICK,
name = "start_service"
)
},
onTextClick = onTextClick,
onLaterClick = onLaterClick,
buttonState = state.isButtonVisible,
screenHeight = screenHeight,
)
}

@Composable
fun StartFilteringScreen(
onButtonClick: () -> Unit,
onTextClick: () -> Unit,
onStartClick: () -> Unit,
onLaterClick: () -> Unit,
buttonState: Boolean,
screenHeight: Float,
) {
Expand Down Expand Up @@ -103,8 +103,8 @@ fun StartFilteringScreen(
Spacer(modifier = Modifier.height((79 * screenHeight).dp))
ButtonAnimation(
buttonState = buttonState,
onButtonClick = onButtonClick,
onTextClick = onTextClick
onStartClick = onStartClick,
onLaterClick = onLaterClick
)
Spacer(modifier = Modifier.height((24 * screenHeight).dp))
}
Expand All @@ -113,8 +113,8 @@ fun StartFilteringScreen(
@Composable
private fun ButtonAnimation(
buttonState: Boolean,
onButtonClick: () -> Unit,
onTextClick: () -> Unit,
onStartClick: () -> Unit,
onLaterClick: () -> Unit,
modifier: Modifier = Modifier,
) {
AnimatedVisibility(
Expand All @@ -129,7 +129,7 @@ private fun ButtonAnimation(
style = TerningTheme.typography.button0,
paddingVertical = 17.dp,
text = R.string.start_filtering_button,
onButtonClick = onButtonClick,
onButtonClick = onStartClick,
cornerRadius = 10.dp,
modifier = Modifier.padding(horizontal = 24.dp)
)
Expand All @@ -140,7 +140,7 @@ private fun ButtonAnimation(
textDecoration = TextDecoration.Underline
),
color = Grey500,
modifier = Modifier.noRippleClickable { onTextClick() }
modifier = Modifier.noRippleClickable { onLaterClick() }
)
}
}
Expand All @@ -153,8 +153,8 @@ private const val DELAY: Long = 1000
private fun StartFilteringScreenPreview() {
TerningPointTheme {
StartFilteringScreen(
onButtonClick = {},
onTextClick = {},
onStartClick = {},
onLaterClick = {},
buttonState = true,
screenHeight = 1f
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ fun NavController.navigateStartFiltering(
}

fun NavGraphBuilder.startFilteringNavGraph(
onButtonClick: (String) -> Unit,
onTextClick: () -> Unit
onStartClick: (String) -> Unit,
onLaterClick: () -> Unit
) {
composable<StartFiltering> {
val args = it.toRoute<StartFiltering>()
StartFilteringRoute(
onButtonClick = { onButtonClick(args.name) },
onTextClick = onTextClick
onStartClick = { onStartClick(args.name) },
onLaterClick = onLaterClick
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ fun MainScreen(
}
)
startFilteringNavGraph(
onButtonClick = { name ->
onStartClick = { name ->
navigator.navController.navigateFilteringOne(name)
},
onTextClick = {
onLaterClick = {
val navOptions = navOptions {
popUpTo(id = navigator.navController.graph.id) {
inclusive = true
Expand Down

0 comments on commit c388c49

Please sign in to comment.