Skip to content

Commit

Permalink
[Fix]: Preview 추가 & naming 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jinuemong committed Jan 25, 2024
1 parent eb41f97 commit 5cc542f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fun NavGraphBuilder.registrationCollectingDestination(

ErrorObserver(viewModel)

RegistrationNamingScreen(
RegistrationCollectingScreen(
appState = appState,
model = model,
event = viewModel.event,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package ac.dnd.bookkeeping.android.presentation.ui.main.registration.collecting

import ac.dnd.bookkeeping.android.presentation.common.util.LaunchedEffectWithLifecycle
import ac.dnd.bookkeeping.android.presentation.common.util.coroutine.event.EventFlow
import ac.dnd.bookkeeping.android.presentation.common.util.coroutine.event.MutableEventFlow
import ac.dnd.bookkeeping.android.presentation.ui.main.ApplicationState
import ac.dnd.bookkeeping.android.presentation.ui.main.home.HomeConstant
import ac.dnd.bookkeeping.android.presentation.ui.main.rememberApplicationState
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
Expand All @@ -18,13 +20,14 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import kotlinx.coroutines.CoroutineExceptionHandler
import kotlinx.coroutines.flow.collectLatest

@Composable
fun RegistrationNamingScreen(
fun RegistrationCollectingScreen(
appState: ApplicationState,
model: RegistrationCollectingModel,
event: EventFlow<RegistrationCollectingEvent>,
Expand Down Expand Up @@ -78,3 +81,17 @@ fun RegistrationNamingScreen(
}
}
}

@Preview
@Composable
fun RegistrationCollectingScreenPreview() {
RegistrationCollectingScreen(
appState = rememberApplicationState(),
model = RegistrationCollectingModel(
state = RegistrationCollectingState.Init
),
event = MutableEventFlow(),
intent = {},
handler = CoroutineExceptionHandler { _, _ -> }
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ package ac.dnd.bookkeeping.android.presentation.ui.main.registration.naming

import ac.dnd.bookkeeping.android.presentation.common.util.LaunchedEffectWithLifecycle
import ac.dnd.bookkeeping.android.presentation.common.util.coroutine.event.EventFlow
import ac.dnd.bookkeeping.android.presentation.common.util.coroutine.event.MutableEventFlow
import ac.dnd.bookkeeping.android.presentation.ui.main.ApplicationState
import ac.dnd.bookkeeping.android.presentation.ui.main.registration.collecting.RegistrationCollectingConstant
import ac.dnd.bookkeeping.android.presentation.ui.main.rememberApplicationState
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
Expand All @@ -18,6 +20,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import kotlinx.coroutines.CoroutineExceptionHandler
Expand Down Expand Up @@ -74,3 +77,17 @@ fun RegistrationNamingScreen(
}
}
}

@Preview
@Composable
fun RegistrationNamingScreenPreview() {
RegistrationNamingScreen(
appState = rememberApplicationState(),
model = RegistrationNamingModel(
state = RegistrationNamingState.Init
),
event = MutableEventFlow(),
intent = {},
handler = CoroutineExceptionHandler { _, _ -> }
)
}

0 comments on commit 5cc542f

Please sign in to comment.