Skip to content

Commit 6c98851

Browse files
committed
Feat: 제보하기 화면 라우팅 연결
1 parent 355908b commit 6c98851

4 files changed

Lines changed: 29 additions & 1 deletion

File tree

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import com.threegap.bitnagil.presentation.login.LoginScreenContainer
1313
import com.threegap.bitnagil.presentation.onboarding.OnBoardingScreenContainer
1414
import com.threegap.bitnagil.presentation.onboarding.OnBoardingViewModel
1515
import com.threegap.bitnagil.presentation.onboarding.model.navarg.OnBoardingScreenArg
16+
import com.threegap.bitnagil.presentation.report.ReportScreenContainer
1617
import com.threegap.bitnagil.presentation.routinelist.RoutineListScreenContainer
1718
import com.threegap.bitnagil.presentation.setting.SettingScreenContainer
1819
import com.threegap.bitnagil.presentation.splash.SplashScreenContainer
@@ -134,6 +135,11 @@ fun MainNavHost(
134135
launchSingleTop = true
135136
}
136137
},
138+
navigateToReport = {
139+
navigator.navController.navigate(Route.Report) {
140+
launchSingleTop = true
141+
}
142+
},
137143
)
138144
}
139145

@@ -289,5 +295,15 @@ fun MainNavHost(
289295
},
290296
)
291297
}
298+
299+
composable<Route.Report> {
300+
ReportScreenContainer(
301+
navigateToBack = {
302+
if (navigator.navController.previousBackStackEntry != null) {
303+
navigator.navController.popBackStack()
304+
}
305+
},
306+
)
307+
}
292308
}
293309
}

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

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

4949
@Serializable
5050
data object Guide : Route
51+
52+
@Serializable
53+
data object Report : Route
5154
}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ fun HomeNavHost(
4343
navigateToRegisterRoutine: (String?) -> Unit,
4444
navigateToEmotion: () -> Unit,
4545
navigateToRoutineList: (String) -> Unit,
46+
navigateToReport: () -> Unit,
4647
) {
4748
val navigator = rememberHomeNavigator()
4849
var showFloatingOverlay by remember { mutableStateOf(false) }
@@ -106,6 +107,11 @@ fun HomeNavHost(
106107

107108
BitnagilFloatingActionMenu(
108109
actions = listOf(
110+
FloatingActionItem(
111+
icon = R.drawable.ic_complaint,
112+
text = "제보하기",
113+
onClick = { navigateToReport() },
114+
),
109115
FloatingActionItem(
110116
icon = R.drawable.ic_routine_add,
111117
text = "루틴 등록",

core/designsystem/src/main/java/com/threegap/bitnagil/designsystem/component/atom/BitnagilFloatingButton.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import androidx.compose.foundation.layout.Column
1717
import androidx.compose.foundation.layout.Row
1818
import androidx.compose.foundation.layout.padding
1919
import androidx.compose.foundation.layout.size
20+
import androidx.compose.foundation.layout.width
2021
import androidx.compose.foundation.shape.CircleShape
2122
import androidx.compose.foundation.shape.RoundedCornerShape
2223
import androidx.compose.material3.Text
@@ -101,7 +102,7 @@ fun BitnagilFloatingActionMenu(
101102
),
102103
) {
103104
Column(
104-
modifier = Modifier.padding(16.dp),
105+
modifier = Modifier.padding(vertical = 16.dp),
105106
verticalArrangement = Arrangement.spacedBy(24.dp),
106107
) {
107108
actions.forEach { action ->
@@ -173,6 +174,8 @@ private fun FloatingActionMenuItem(
173174
horizontalArrangement = Arrangement.spacedBy(14.dp),
174175
modifier = modifier
175176
.scale(scale)
177+
.padding(horizontal = 16.dp)
178+
.width(112.dp)
176179
.clickableWithoutRipple { onClick() },
177180
) {
178181
BitnagilIcon(

0 commit comments

Comments
 (0)