Skip to content

Commit

Permalink
[feat] #4 search navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
Sangwook123 committed May 1, 2024
1 parent bbd80fb commit b974bbe
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
13 changes: 13 additions & 0 deletions feature/search/src/main/java/org/sopt/search/SearchScreen.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.sopt.search

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier

@Composable
fun SearchRoute(
label : String,
) {
Box(modifier = Modifier.fillMaxSize()){}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package org.sopt.search.navigation

import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavOptions
import androidx.navigation.compose.composable
import org.sopt.search.SearchRoute

fun NavController.navigateSearch(navOptions: NavOptions) {
navigate(SearchRoute.route, navOptions)
}

fun NavGraphBuilder.searchNavGraph(
){
composable(route = SearchRoute.route) {
SearchRoute(
label = ""
)
}
}

object SearchRoute {
const val route = "search"
}
17 changes: 17 additions & 0 deletions feature/search/src/test/java/org/sopt/search/ExampleUnitTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.sopt.search

import org.junit.Test

import org.junit.Assert.*

/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}

0 comments on commit b974bbe

Please sign in to comment.