Skip to content
Closed
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
9819c2d
✨ Feat: 앱 공통 버튼 구현
dogmania Jan 28, 2026
af6eb65
✨ Feat: onboarding 모듈 추가
chanho0908 Feb 1, 2026
e863215
✨ Feat: 뒤로가기, 체크 버튼 이미지 추가
chanho0908 Feb 1, 2026
a18b5a0
✨ Feat: Nickname 도메인 및 예외 상태 클래스 추가
chanho0908 Feb 1, 2026
69d949e
✨ Feat: Nickname 입력 컴포저블 추가
chanho0908 Feb 1, 2026
d75c7ed
✨ Feat: 프로필 UiModel 추가
chanho0908 Feb 1, 2026
85719ae
✨ Feat: 온보딩 화면 Topbar 추가
chanho0908 Feb 1, 2026
ced84c7
✨ Feat: 온보딩 Intent, SideEffect, UiState 추가
chanho0908 Feb 1, 2026
cdf9e50
✨ Feat: 프로필 화면 구현
chanho0908 Feb 1, 2026
f6fcc22
✨ Feat: 온보딩 네비게이션 그래프 설정
chanho0908 Feb 1, 2026
d689e69
✨ Feat: 프로필 화면 SideEffect 처리 로직 추가
chanho0908 Feb 1, 2026
c3dd4cd
✨ Feat: 네임스페이스 수정
chanho0908 Feb 1, 2026
f7b5d67
♻️ Refactor: import 누락 수정
chanho0908 Feb 1, 2026
b69d733
✨ Feat: 커플 연결 화면 구현
chanho0908 Feb 1, 2026
3378d05
♻️ Refactor: 프로필 설정 화면 뒤로가기 제거
chanho0908 Feb 1, 2026
1820bb2
✨Merge branch 'feat/#35-profile-setting' into feat/#35-couple-connect
chanho0908 Feb 1, 2026
5f34d71
♻️ Refactor: 커플 연결 진입 화면 컴포넌트 분리
chanho0908 Feb 1, 2026
dce7ce6
✨ Feat: 초대 코드 도메인 모델 유효성 검증 간소화 및 테스트 수정
chanho0908 Feb 1, 2026
2459741
🎨 Add: 복사 아이콘 추가
chanho0908 Feb 1, 2026
4c03402
✨ Feat: 초대 코드 입력 텍스트 필드 추가
chanho0908 Feb 1, 2026
ef348d8
✨ Feat: 초대 코드 입력 기능 추가
chanho0908 Feb 1, 2026
eab7ac2
✨ Feat: 초대 코드 복사 기능 추가
chanho0908 Feb 1, 2026
ad94894
♻️ Refactor: 주석추가
chanho0908 Feb 1, 2026
e428b41
♻️ Refactor: 오타 수정
chanho0908 Feb 2, 2026
22af1ad
Merge branch 'feat/#35-profile-setting' into feat/#35-couple-connect
chanho0908 Feb 3, 2026
4983c58
♻️ Refactor: 도메인 에러처리 방식 수정
chanho0908 Feb 3, 2026
ab00c5c
♻️ Refactor: 토끼리뷰 반영(https://github.com/YAPP-Github/Twix-Android/pull…
chanho0908 Feb 3, 2026
30009a6
♻️ Refactor: 토끼리뷰 반영(https://github.com/YAPP-Github/Twix-Android/pull…
chanho0908 Feb 3, 2026
432f0f7
✨Merge branch 'feat/tast-certification-gallery-pick' into feat/#38-ta…
chanho0908 Feb 3, 2026
75e31da
♻️ Refactor: 닉네임 도메인 유효성 검사 수정
chanho0908 Feb 3, 2026
062cb99
♻️ Refactor: stringResource 적용
chanho0908 Feb 3, 2026
535f81e
✨Feat: 초대장 전송 버튼 임시 주석처리
chanho0908 Feb 3, 2026
0657417
♻️ Refactor: KtlintFormat 적용
chanho0908 Feb 4, 2026
4bc1d67
✨Feat: 닉네임 클리어 버튼 추가
chanho0908 Feb 4, 2026
32cfd6b
✨Merge branch 'feat/#35-profile-setting' into feat/#35-couple-connect
chanho0908 Feb 4, 2026
82b1115
Merge branch 'develop' into feat/#35-profile-setting
chanho0908 Feb 5, 2026
7ef3d69
♻️ Refactor: toast import 수정
chanho0908 Feb 5, 2026
ffc5e4b
✨ Merge branch 'feat/#35-profile-setting' into feat/#35-couple-connect
chanho0908 Feb 5, 2026
a9d421b
Merge branch 'develop' into feat/#35-profile-setting
chanho0908 Feb 5, 2026
513e023
Merge branch 'develop' into feat/#35-profile-setting
chanho0908 Feb 6, 2026
f68bf96
✨ Feat: 로그인 성공 시 온보딩 상태에 따라 분기 처리
chanho0908 Feb 6, 2026
0bdbbb2
♻️ Refactor: API 엔드포인트 경로 수정
chanho0908 Feb 6, 2026
f8431c6
✨ Feat: trailing Icon이 끝에 붙지 않는 문제 수정
chanho0908 Feb 6, 2026
611a2a2
♻️ Refactor: NameTextField를 디자인 시스템 UnderlineTextField로 교체
chanho0908 Feb 6, 2026
6bdaac3
Merge branch 'feat/#35-profile-setting' into feat/#35-couple-connect
chanho0908 Feb 6, 2026
be76871
✨ Feat: 해지한 커플 복구 안내 추가
chanho0908 Feb 6, 2026
4f2747c
✨ Feat: 내 초대코드 조회 API 연동
chanho0908 Feb 6, 2026
0b4179b
✨ Feat: 커플 연결 API 연동 및 화면 전환 구현
chanho0908 Feb 6, 2026
78bb992
📝 Chore: 상대방 연결 에러 처리 구현 주석 추가
chanho0908 Feb 6, 2026
d7a5e82
♻️ Refactor: 클립보드 복사기능 수정
chanho0908 Feb 6, 2026
f4d1cdc
✨ Feat: 초대코드 입력 후 다음 화면으로 이동 구현
chanho0908 Feb 6, 2026
dc31a63
Merge pull request #51 from YAPP-Github/feat/#35-couple-connect
chanho0908 Feb 6, 2026
178e778
✨ Feat: 온보딩 플로우 수정
chanho0908 Feb 6, 2026
4f366c0
♻️ Refactor: 내 초대코드 조회 시점 변경
chanho0908 Feb 6, 2026
596757a
✨ Feat: D-day 입력 필드 UI 구현
chanho0908 Feb 6, 2026
6b338ff
✨ Feat: D-day 화면 TopBar 구현
chanho0908 Feb 6, 2026
4d97010
✨ Feat: DdayUiModel 구현
chanho0908 Feb 6, 2026
2c7f3e7
✨ Feat: 디데이 등록 화면 구현
chanho0908 Feb 6, 2026
f4ba708
✨ Feat: graphViewModel 추가
chanho0908 Feb 6, 2026
13093e7
✨ Feat: 초대코드 화면 뒤로가기 버튼 추가
chanho0908 Feb 6, 2026
4f6ed19
♻️ Refactor: OnBoardingSideEffect의 중첩 인터페이스 구조 변경
chanho0908 Feb 6, 2026
8c7d409
♻️ Refactor: graphViewModel 개행 수정
chanho0908 Feb 6, 2026
a8f3e1b
♻️ Refactor: 온보딩 그래프 ViewModel 공유 및 koinViewModel 제거
chanho0908 Feb 6, 2026
ace6a2d
♻️ Refactor: fetchOnboardingStatus suspend 함수로 변경
chanho0908 Feb 6, 2026
5171b75
✨ Fix: DdayScreenPrview 오타 수정
chanho0908 Feb 6, 2026
21c6733
✨ Feat: 기념일까지 남은 날짜(D-day) 설정 화면 버튼 활성화 로직 추가
chanho0908 Feb 6, 2026
5048491
Merge branch 'develop' into feat/#35-profile-setting
chanho0908 Feb 6, 2026
820ad52
♻️ Refactor: 서버 통신 API에 safeApiCall 적용
chanho0908 Feb 6, 2026
a1eb97f
♻️ Refactor: 로그인 실패 예외 처리 추가
chanho0908 Feb 6, 2026
4be8a8a
♻️ Refactor: OnBoardingRepository의 suspend fun 반환 타입을 AppResult로 변경
chanho0908 Feb 6, 2026
3cf6165
✨ Feat: 온보딩 예외 처리 및 토스트 추가
chanho0908 Feb 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ dependencies {
implementation(projects.domain)
implementation(projects.feature.login)
implementation(projects.feature.main)
implementation(projects.feature.onboarding)

// Firebase
implementation(platform(libs.google.firebase.bom))
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/com/yapp/twix/di/FeatureModules.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ package com.yapp.twix.di
import com.twix.home.di.homeModule
import com.twix.login.di.loginModule
import com.twix.main.di.mainModule
import com.twix.onboarding.di.onBoardingModule
import org.koin.core.module.Module

val featureModules: List<Module> =
listOf(
loginModule,
mainModule,
homeModule,
onBoardingModule,
)
4 changes: 3 additions & 1 deletion app/src/main/java/com/yapp/twix/main/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.safeContentPadding
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
Expand Down Expand Up @@ -34,7 +35,8 @@ class MainActivity : ComponentActivity() {
toastManager = toastManager,
modifier =
Modifier
.align(Alignment.BottomCenter),
.align(Alignment.BottomCenter)
.imePadding(),
)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package com.twix.designsystem.components.button

import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Surface
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.twix.designsystem.components.text.AppText
import com.twix.designsystem.theme.CommonColor
import com.twix.designsystem.theme.GrayColor
import com.twix.domain.model.enums.AppTextStyle

@Composable
fun AppButton(
modifier: Modifier = Modifier,
text: String,
textColor: Color = CommonColor.White,
backgroundColor: Color = GrayColor.C500,
enabled: Boolean = true,
cornerRadius: Dp = 12.dp,
border: BorderStroke? = null,
onClick: () -> Unit = {},
) {
Surface(
color = backgroundColor,
shape = RoundedCornerShape(cornerRadius),
border = border,
onClick = onClick,
enabled = enabled,
modifier = modifier,
) {
AppText(
text = text,
color = textColor,
style = AppTextStyle.T2,
textAlign = TextAlign.Center,
modifier =
Modifier
.fillMaxWidth()
.padding(vertical = 14.dp),
)
}
}
13 changes: 13 additions & 0 deletions core/design-system/src/main/res/drawable/ic_arrow1_m_left.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:strokeWidth="1"
android:pathData="M14.5,17.023L9.5,12.023L14.5,7.023"
android:strokeLineJoin="round"
android:fillColor="#00000000"
android:strokeColor="#171717"
android:strokeLineCap="round"/>
</vector>
9 changes: 9 additions & 0 deletions core/design-system/src/main/res/drawable/ic_check_success.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="16dp"
android:height="16dp"
android:viewportWidth="16"
android:viewportHeight="16">
<path
android:pathData="M7.02,9.26L5.515,7.755C5.387,7.627 5.223,7.563 5.025,7.563C4.827,7.563 4.663,7.627 4.535,7.755C4.407,7.883 4.343,8.047 4.343,8.245C4.343,8.443 4.407,8.607 4.535,8.735L6.53,10.73C6.67,10.87 6.833,10.94 7.02,10.94C7.207,10.94 7.37,10.87 7.51,10.73L11.465,6.775C11.593,6.647 11.658,6.483 11.658,6.285C11.658,6.087 11.593,5.923 11.465,5.795C11.337,5.667 11.173,5.602 10.975,5.602C10.777,5.602 10.613,5.667 10.485,5.795L7.02,9.26ZM8,15C7.032,15 6.122,14.816 5.27,14.449C4.418,14.081 3.678,13.583 3.047,12.953C2.418,12.323 1.919,11.582 1.551,10.73C1.184,9.878 1,8.968 1,8C1,7.032 1.184,6.122 1.551,5.27C1.919,4.418 2.418,3.678 3.047,3.047C3.678,2.418 4.418,1.919 5.27,1.551C6.122,1.184 7.032,1 8,1C8.968,1 9.878,1.184 10.73,1.551C11.582,1.919 12.323,2.418 12.953,3.047C13.583,3.678 14.081,4.418 14.449,5.27C14.816,6.122 15,7.032 15,8C15,8.968 14.816,9.878 14.449,10.73C14.081,11.582 13.583,12.323 12.953,12.953C12.323,13.583 11.582,14.081 10.73,14.449C9.878,14.816 8.968,15 8,15Z"
android:fillColor="#1ED45A"/>
</vector>
2 changes: 1 addition & 1 deletion core/design-system/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
<string name="home_today_goal">오늘 우리 목표</string>
<string name="home_empty_goal_guide">첫 목표를 세워볼까요?</string>

</resources>
</resources>
13 changes: 13 additions & 0 deletions core/navigation/src/main/java/com/twix/navigation/NavRoutes.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,17 @@ sealed class NavRoutes(
object MainGraph : NavRoutes("main_graph")

object MainRoute : NavRoutes("main")

/**
* OnboardingGraph
* */
object OnboardingGraph : NavRoutes("onboarding_graph")

object OnboardingRoute : NavRoutes("onboarding")

object CoupleConnectionRoute : NavRoutes("couple_connect")

object ProfileRoute : NavRoutes("profile")

object DdayRoute : NavRoutes("dday")
}
19 changes: 19 additions & 0 deletions domain/src/main/java/com/twix/domain/model/nickname/NickName.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.twix.domain.model.nickname

@JvmInline
value class NickName private constructor(
val value: String,
) {
companion object {
fun create(value: String): Result<NickName> =
runCatching {
require(value.length in MIN_LENGTH..MAX_LENGTH) {
NickNameException.InvalidLengthException
}
NickName(value)
}

private const val MIN_LENGTH = 2
private const val MAX_LENGTH = 8
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.twix.domain.model.nickname

sealed class NickNameException : Throwable() {
data object InvalidLengthException : NickNameException()
}
1 change: 1 addition & 0 deletions feature/onboarding/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
7 changes: 7 additions & 0 deletions feature/onboarding/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
plugins {
alias(libs.plugins.twix.feature)
}

android {
namespace = "com.twix.onboarding"
}
Empty file.
21 changes: 21 additions & 0 deletions feature/onboarding/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
4 changes: 4 additions & 0 deletions feature/onboarding/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.twix.onboarding.couple

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier

@Composable
fun CoupleConnectRoute(onNext: () -> Unit) {
Column(
modifier = Modifier.fillMaxSize(),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally,
) {
Text("커플 등록 등록 화면")

Button(
onClick = { onNext() },
) {
Text("다음")
}
Comment on lines +136 to +143
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

CommonBottomSheet의 exit 애니메이션이 동작하지 않을 수 있습니다.

현재 if (showRestoreSheet) 조건으로 CommonBottomSheet를 마운트/언마운트하고 있는데, CommonBottomSheet(CommonBottomSheet.kt Line 52-105)는 visible 파라미터의 변화를 감지하여 내부적으로 internalVisibledelay(200)rendering = false 순서로 exit 애니메이션을 처리합니다.

if문으로 제거하면 visiblefalse로 바뀌기 전에 Composable 자체가 composition에서 사라지기 때문에, exit 애니메이션(scrim fade-out 등)이 재생되지 않습니다.

CommonBottomSheetvisible 파라미터에 showRestoreSheet를 직접 전달하고, if문을 제거하는 방식이 더 적합합니다.

🛠️ 수정 제안: visible 파라미터 활용
-        if (showRestoreSheet) {
-            CommonBottomSheet(
-                visible = true,
-                config = CommonBottomSheetConfig(showHandle = false),
-                onDismissRequest = onDismissSheet,
-                content = { RestoreCoupleBottomSheetContent() },
-            )
-        }
+        CommonBottomSheet(
+            visible = showRestoreSheet,
+            config = CommonBottomSheetConfig(showHandle = false),
+            onDismissRequest = onDismissSheet,
+            content = { RestoreCoupleBottomSheetContent() },
+        )
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (showRestoreSheet) {
CommonBottomSheet(
visible = true,
config = CommonBottomSheetConfig(showHandle = false),
onDismissRequest = onDismissSheet,
content = { RestoreCoupleBottomSheetContent() },
)
}
CommonBottomSheet(
visible = showRestoreSheet,
config = CommonBottomSheetConfig(showHandle = false),
onDismissRequest = onDismissSheet,
content = { RestoreCoupleBottomSheetContent() },
)
🤖 Prompt for AI Agents
In
`@feature/onboarding/src/main/java/com/twix/onboarding/couple/CoupleConnectRoute.kt`
around lines 108 - 115, The bottom sheet is being conditionally composed with an
if (showRestoreSheet) which prevents CommonBottomSheet from observing visible
changes and running its exit animation; remove the surrounding if and always
compose CommonBottomSheet, passing showRestoreSheet into its visible parameter
(keep onDismissRequest = onDismissSheet and content = {
RestoreCoupleBottomSheetContent() }) so CommonBottomSheet can animate its
internalVisible → delay(200) → rendering = false exit sequence correctly.

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package com.twix.onboarding.dday

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier

@Composable
fun DdayRouete(
onComplete: () -> Unit,
onBack: () -> Unit,
) {
Column(
modifier = Modifier.fillMaxSize(),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally,
) {
Text("디데이 등록 화면")

Button(
onClick = { onBack() },
) {
Text("뒤로")
}

Button(
onClick = { onComplete() },
) {
Text("다음")
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.twix.onboarding.di

import com.twix.navigation.NavRoutes
import com.twix.navigation.base.NavGraphContributor
import com.twix.onboarding.navigation.OnboardingNavGraph
import com.twix.onboarding.vm.OnBoardingViewModel
import org.koin.core.module.dsl.viewModelOf
import org.koin.core.qualifier.named
import org.koin.dsl.module

val onBoardingModule =
module {
viewModelOf(::OnBoardingViewModel)
single<NavGraphContributor>(named(NavRoutes.OnboardingRoute.route)) { OnboardingNavGraph }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.twix.onboarding.model

import com.twix.ui.base.Intent

sealed interface OnBoardingIntent : Intent {
data class WriteNickName(
val value: String,
) : OnBoardingIntent

data object SubmitNickName : OnBoardingIntent
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.twix.onboarding.model

import com.twix.ui.base.SideEffect

sealed interface OnBoardingSideEffect : SideEffect {
sealed interface ProfileSetting : OnBoardingSideEffect {
data object ShowInvalidNickNameToast : ProfileSetting

data object NavigateToNext : ProfileSetting
}

sealed interface CoupleConnection : OnBoardingSideEffect

sealed interface DDaySetting : OnBoardingSideEffect
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.twix.onboarding.model

import androidx.compose.runtime.Immutable
import com.twix.onboarding.profile.ProfileUiModel
import com.twix.ui.base.State

@Immutable
data class OnBoardingUiState(
val profile: ProfileUiModel = ProfileUiModel(),
) : State {
val isValidNickName: Boolean
get() = profile.isValid

fun updateNickName(value: String) = copy(profile = profile.updateNickname(value))
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package com.twix.onboarding.navigation

import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavHostController
import androidx.navigation.compose.composable
import androidx.navigation.navigation
import com.twix.navigation.NavRoutes
import com.twix.navigation.base.NavGraphContributor
import com.twix.onboarding.couple.CoupleConnectRoute
import com.twix.onboarding.dday.DdayRouete
import com.twix.onboarding.profile.ProfileRoute

object OnboardingNavGraph : NavGraphContributor {
override val graphRoute: NavRoutes
get() = NavRoutes.OnboardingGraph

override val startDestination: String
get() = NavRoutes.CoupleConnectionRoute.route

override val priority: Int = 2

override fun NavGraphBuilder.registerGraph(navController: NavHostController) {
navigation(
route = graphRoute.route,
startDestination = startDestination,
) {
composable(NavRoutes.CoupleConnectionRoute.route) {
CoupleConnectRoute(
onNext = { navController.navigate(NavRoutes.ProfileRoute.route) },
)
}
composable(NavRoutes.ProfileRoute.route) {
ProfileRoute(
onNext = { navController.navigate(NavRoutes.DdayRoute.route) },
)
}
composable(NavRoutes.DdayRoute.route) {
DdayRouete(
onComplete = {
navController.navigate(NavRoutes.MainGraph.route) {
popUpTo(graphRoute.route) { inclusive = true }
launchSingleTop = true
}
},
onBack = { navController.popBackStack() },
)
}
}
}
}
Loading