-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from Team-Ampersand/feature/70_write_navigate_…
…logic 🔀 :: (#70) write navigate logic
- Loading branch information
Showing
20 changed files
with
189 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.msg.dotori | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.navigation.NavHostController | ||
import androidx.navigation.compose.NavHost | ||
import com.msg.presentation.view.find_password.navigation.findPasswordScreen | ||
import com.msg.presentation.view.login.navigation.loginScreen | ||
import com.msg.presentation.view.massage_chair.navigation.massageChairScreen | ||
import com.msg.presentation.view.music.navigation.musicScreen | ||
import com.msg.presentation.view.self_study.navigation.selfStudyScreen | ||
import com.msg.presentation.view.signup.navigation.signUpScreen | ||
import com.msg.presentation.view.student_info.navigation.studentInfoScreen | ||
|
||
@Composable | ||
fun DotoriNavHost( | ||
navController: NavHostController, | ||
startDestination: String | ||
) { | ||
NavHost( | ||
navController = navController, | ||
startDestination = startDestination | ||
) { | ||
loginScreen() | ||
findPasswordScreen() | ||
signUpScreen() | ||
massageChairScreen() | ||
selfStudyScreen() | ||
musicScreen() | ||
studentInfoScreen() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...rc/main/java/com/msg/presentation/view/find_password/navigation/FindPasswordNavigation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.msg.presentation.view.find_password.navigation | ||
|
||
import androidx.navigation.NavController | ||
import androidx.navigation.NavGraphBuilder | ||
import androidx.navigation.compose.composable | ||
import com.msg.presentation.view.find_password.FindPasswordScreen | ||
|
||
const val findPasswordRoute = "find_password_route" | ||
|
||
fun NavController.navigateToFindPassword() { | ||
this.navigate(findPasswordRoute) | ||
} | ||
|
||
fun NavGraphBuilder.findPasswordScreen() { | ||
composable(findPasswordRoute) { | ||
FindPasswordScreen() | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
presentation/src/main/java/com/msg/presentation/view/login/navigation/LoginNavigation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.msg.presentation.view.login.navigation | ||
|
||
import androidx.navigation.NavController | ||
import androidx.navigation.NavGraphBuilder | ||
import androidx.navigation.compose.composable | ||
import com.msg.presentation.view.login.LoginScreen | ||
|
||
const val loginRoute = "login_route" | ||
|
||
fun NavController.navigateToLogin() { | ||
this.navigate(loginRoute) | ||
} | ||
|
||
fun NavGraphBuilder.loginScreen() { | ||
composable(loginRoute) { | ||
LoginScreen {} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...rc/main/java/com/msg/presentation/view/massage_chair/navigation/MassageChairNavigation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.msg.presentation.view.massage_chair.navigation | ||
|
||
import androidx.navigation.NavController | ||
import androidx.navigation.NavGraphBuilder | ||
import androidx.navigation.compose.composable | ||
import com.msg.presentation.view.massage_chair.MassageChairScreen | ||
|
||
const val massageChairRoute = "massage_chair_route" | ||
|
||
fun NavController.navigateToMassageChair() { | ||
this.navigate(massageChairRoute) | ||
} | ||
|
||
fun NavGraphBuilder.massageChairScreen() { | ||
composable(massageChairRoute) { | ||
MassageChairScreen() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...entation/view/music/BottomSheetContent.kt → ...iew/music/component/BottomSheetContent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...resentation/view/music/BottomSheetType.kt → ...n/view/music/component/BottomSheetType.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...g/presentation/view/music/DotoriTopBar.kt → ...tion/view/music/component/DotoriTopBar.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...entation/view/music/MusicDialogContent.kt → ...iew/music/component/MusicDialogContent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...sg/presentation/view/music/MusicHeader.kt → ...ation/view/music/component/MusicHeader.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
presentation/src/main/java/com/msg/presentation/view/music/navigation/MusicNavigation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.msg.presentation.view.music.navigation | ||
|
||
import androidx.navigation.NavController | ||
import androidx.navigation.NavGraphBuilder | ||
import androidx.navigation.compose.composable | ||
import com.msg.presentation.view.music.MusicScreen | ||
|
||
const val musicRoute = "music_route" | ||
|
||
fun NavController.navigateToMusic() { | ||
this.navigate(musicRoute) | ||
} | ||
|
||
fun NavGraphBuilder.musicScreen() { | ||
composable(musicRoute) { | ||
MusicScreen() | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...tion/src/main/java/com/msg/presentation/view/self_study/navigation/SelfStudyNavigation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.msg.presentation.view.self_study.navigation | ||
|
||
import androidx.navigation.NavController | ||
import androidx.navigation.NavGraphBuilder | ||
import androidx.navigation.compose.composable | ||
import com.msg.presentation.view.self_study.SelfStudyScreen | ||
|
||
const val selfStudyRoute = "self_study_route" | ||
|
||
fun NavController.navigateToSelfStudy() { | ||
this.navigate(selfStudyRoute) | ||
} | ||
|
||
fun NavGraphBuilder.selfStudyScreen() { | ||
composable(selfStudyRoute) { | ||
SelfStudyScreen() | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
presentation/src/main/java/com/msg/presentation/view/signup/navigation/SignUpNavigation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.msg.presentation.view.signup.navigation | ||
|
||
import androidx.navigation.NavController | ||
import androidx.navigation.NavGraphBuilder | ||
import androidx.navigation.compose.composable | ||
import com.msg.presentation.view.signup.SignUpScreen | ||
|
||
const val signUpRoute = "sign_up_route" | ||
|
||
fun NavController.navigateToSignUp() { | ||
this.navigate(signUpRoute) | ||
} | ||
|
||
fun NavGraphBuilder.signUpScreen() { | ||
composable(signUpRoute) { | ||
SignUpScreen() | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
.../src/main/java/com/msg/presentation/view/student_info/navigation/StudentInfoNavigation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.msg.presentation.view.student_info.navigation | ||
|
||
import androidx.navigation.NavController | ||
import androidx.navigation.NavGraphBuilder | ||
import androidx.navigation.compose.composable | ||
import com.msg.presentation.view.student_info.StudentInfoScreen | ||
|
||
const val studentInfoRoute = "student_info_route" | ||
|
||
fun NavController.navigateToStudentInfo() { | ||
this.navigate(studentInfoRoute) | ||
} | ||
|
||
fun NavGraphBuilder.studentInfoScreen() { | ||
composable(studentInfoRoute) { | ||
StudentInfoScreen() | ||
} | ||
} |