Skip to content

Commit

Permalink
[feat] mash-up-kr#111 Signal 보내기 화면 route 및 graph 생성
Browse files Browse the repository at this point in the history
  • Loading branch information
JaesungLeee committed Jul 4, 2023
1 parent 5ebede5 commit 8f27f30
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package com.mashup.presentation.feature.signal.navigation

import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavOptions
import androidx.navigation.compose.composable
import androidx.navigation.navigation
import com.mashup.presentation.navigation.KeyLinkNavigationRoute

/**
* Ssam_D_Android
* @author jaesung
* @created 2023/07/04
*/
fun NavController.navigateToSignalKeyword(navOptions: NavOptions? = null) {
navigate(
route = KeyLinkNavigationRoute.SignalGraph.SignalKeywordRoute.route,
navOptions = navOptions
)
}

fun NavController.navigateToSignalComplete(navOptions: NavOptions? = null) {
navigate(
route = KeyLinkNavigationRoute.SignalGraph.SignalCompleteRoute.route,
navOptions = navOptions
)
}

fun NavGraphBuilder.signalGraph() {
navigation(
route = KeyLinkNavigationRoute.SignalGraph.route,
startDestination = KeyLinkNavigationRoute.SignalGraph.SignalContentRoute.route
) {
composable(route = KeyLinkNavigationRoute.SignalGraph.SignalContentRoute.route) {
// SignalContentRoute
}

composable(route = KeyLinkNavigationRoute.SignalGraph.SignalKeywordRoute.route) {
// SignalKeywordRoute
}

composable(route = KeyLinkNavigationRoute.SignalGraph.SignalCompleteRoute.route) {
// SignalCompleteRoute
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import androidx.compose.ui.Modifier
import androidx.navigation.compose.NavHost
import com.mashup.presentation.KeyLinkAppState
import com.mashup.presentation.feature.home.navigation.homeGraph
import com.mashup.presentation.feature.signal.navigation.signalGraph

/**
* Ssam_D_Android
Expand All @@ -25,5 +26,6 @@ fun KeyLinkNavHost(
modifier = modifier
) {
homeGraph()
signalGraph()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ sealed class KeyLinkNavigationRoute(val route: String) {
object GuideRoute : KeyLinkNavigationRoute(guideRoute)
object ProfileRoute : KeyLinkNavigationRoute(profileRoute)
}
object SignalGraph : KeyLinkNavigationRoute(signalGraphPattern) {
object SignalContentRoute : KeyLinkNavigationRoute(signalContentRoute)
object SignalKeywordRoute : KeyLinkNavigationRoute(signalKeywordRoute)
object SignalCompleteRoute : KeyLinkNavigationRoute(signalCompleteRoute)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@ const val homeGraphPattern = "home_graph"
const val homeRoute = "home_graph/home"
const val guideRoute = "home_graph/guide"
const val profileRoute = "home_graph/profile"
const val editKeywordRoute = "home_graph/edit_keyword"
const val editKeywordRoute = "home_graph/edit_keyword"

const val signalGraphPattern = "signal_graph"
const val signalContentRoute = "signal_graph/content"
const val signalKeywordRoute = "signal_graph/keyword"
const val signalCompleteRoute = "signal_graph/complete"

0 comments on commit 8f27f30

Please sign in to comment.