Skip to content

Commit 648e824

Browse files
authored
Merge pull request #110 from YAPP-Github/ui/#109-guide
[UI/#109] 설명서 화면을 구현합니다.
2 parents ca58fc2 + 8f28127 commit 648e824

File tree

32 files changed

+406
-2
lines changed

32 files changed

+406
-2
lines changed

app/src/main/java/com/threegap/bitnagil/MainNavHost.kt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import androidx.navigation.compose.composable
88
import androidx.navigation.toRoute
99
import com.threegap.bitnagil.navigation.home.HomeNavHost
1010
import com.threegap.bitnagil.presentation.emotion.EmotionScreenContainer
11+
import com.threegap.bitnagil.presentation.guide.GuideScreenContainer
1112
import com.threegap.bitnagil.presentation.login.LoginScreenContainer
1213
import com.threegap.bitnagil.presentation.onboarding.OnBoardingScreenContainer
1314
import com.threegap.bitnagil.presentation.onboarding.OnBoardingViewModel
@@ -112,6 +113,11 @@ fun MainNavHost(
112113
),
113114
)
114115
},
116+
navigateToGuide = {
117+
navigator.navController.navigate(Route.Guide) {
118+
launchSingleTop = true
119+
}
120+
},
115121
navigateToRegisterRoutine = { routineId ->
116122
navigator.navController.navigate(Route.WriteRoutine(routineId = routineId))
117123
},
@@ -241,5 +247,15 @@ fun MainNavHost(
241247
},
242248
)
243249
}
250+
251+
composable<Route.Guide> {
252+
GuideScreenContainer(
253+
navigateToBack = {
254+
if (navigator.navController.previousBackStackEntry != null) {
255+
navigator.navController.popBackStack()
256+
}
257+
},
258+
)
259+
}
244260
}
245261
}

app/src/main/java/com/threegap/bitnagil/Route.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,7 @@ sealed interface Route {
4141

4242
@Serializable
4343
data object Withdrawal : Route
44+
45+
@Serializable
46+
data object Guide : Route
4447
}

app/src/main/java/com/threegap/bitnagil/navigation/home/HomeNavHost.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ fun HomeNavHost(
3939
navigateToOnBoarding: () -> Unit,
4040
navigateToNotice: () -> Unit,
4141
navigateToQnA: () -> Unit,
42+
navigateToGuide: () -> Unit,
4243
navigateToRegisterRoutine: (String?) -> Unit,
4344
navigateToEmotion: () -> Unit,
4445
) {
@@ -62,6 +63,7 @@ fun HomeNavHost(
6263
) {
6364
composable(HomeRoute.Home.route) {
6465
HomeScreenContainer(
66+
navigateToGuide = navigateToGuide,
6567
navigateToRegisterRoutine = {
6668
navigateToRegisterRoutine(null)
6769
},
21 KB
Loading
23.7 KB
Loading
36 KB
Loading
12.7 KB
Loading
14.5 KB
Loading
20.6 KB
Loading
29.2 KB
Loading

0 commit comments

Comments
 (0)