generated from GSM-MSG/MSG-Repository-Generator
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
50 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -5,5 +5,6 @@ enum class TopLevelDestination { | |
SIGN_UP, | ||
STUDENT_ACTIVITY, | ||
MY_PAGE, | ||
POST | ||
POST, | ||
CLUB | ||
} |
36 changes: 36 additions & 0 deletions
36
feature/club/src/main/java/com/msg/club/navigation/ClubPageNavigation.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,36 @@ | ||
package com.msg.club.navigation | ||
|
||
import androidx.navigation.NavController | ||
import androidx.navigation.NavGraphBuilder | ||
import androidx.navigation.NavOptions | ||
import androidx.navigation.compose.composable | ||
import com.msg.club.ClubDetailScreenRoute | ||
import com.msg.club.ClubScreenRoute | ||
|
||
const val clubRoute = "club_route" | ||
const val clubDetailRoute = "club_detail_route" | ||
|
||
fun NavController.navigateToClubPage(navOptions: NavOptions? = null) { | ||
this.navigate(clubRoute, navOptions) | ||
} | ||
|
||
fun NavGraphBuilder.clubScreen(onItemClicked: () -> Unit) { | ||
composable(route = clubRoute) { | ||
ClubScreenRoute( | ||
onItemClicked = onItemClicked | ||
) | ||
} | ||
} | ||
|
||
fun NavController.navigateToClubDetailPage(navOptions: NavOptions? = null) { | ||
this.navigate(clubDetailRoute, navOptions) | ||
} | ||
|
||
fun NavGraphBuilder.clubDetailScreen(onBackClicked: () -> Unit, onBackClickedByAdmin: () -> Unit) { | ||
composable(route = clubDetailRoute) { | ||
ClubDetailScreenRoute( | ||
onBackClicked = onBackClicked, | ||
onBackClickedByAdmin = onBackClickedByAdmin | ||
) | ||
} | ||
} |