From ec251578f859c94bc93e7a920279e8f4199ae464 Mon Sep 17 00:00:00 2001 From: Hyobeen-Park Date: Tue, 10 Sep 2024 03:04:43 +0900 Subject: [PATCH] =?UTF-8?q?[FEAT/#204]=20=EB=B2=84=ED=8A=BC=20=EC=BA=98?= =?UTF-8?q?=EB=A6=B0=EB=8D=94=EB=A1=9C=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/terning/feature/home/home/HomeRoute.kt | 11 ++++++++--- .../home/home/component/HomeUpcomingEmptyIntern.kt | 5 ++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/feature/src/main/java/com/terning/feature/home/home/HomeRoute.kt b/feature/src/main/java/com/terning/feature/home/home/HomeRoute.kt index fe6f18695..5cc35bf73 100644 --- a/feature/src/main/java/com/terning/feature/home/home/HomeRoute.kt +++ b/feature/src/main/java/com/terning/feature/home/home/HomeRoute.kt @@ -30,7 +30,6 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.flowWithLifecycle import androidx.navigation.NavHostController import com.google.accompanist.systemuicontroller.rememberSystemUiController -import com.terning.feature.home.home.component.HomeFilteringBottomSheet import com.terning.core.designsystem.component.bottomsheet.SortingBottomSheet import com.terning.core.designsystem.component.button.SortingButton import com.terning.core.designsystem.component.image.TerningImage @@ -52,8 +51,10 @@ import com.terning.domain.entity.home.HomeFilteringInfo import com.terning.domain.entity.home.HomeRecommendIntern import com.terning.domain.entity.home.HomeUpcomingIntern import com.terning.feature.R +import com.terning.feature.calendar.calendar.navigation.navigateCalendar import com.terning.feature.dialog.cancel.ScrapCancelDialog import com.terning.feature.dialog.detail.ScrapDialog +import com.terning.feature.home.home.component.HomeFilteringBottomSheet import com.terning.feature.home.home.component.HomeFilteringScreen import com.terning.feature.home.home.component.HomeRecommendEmptyIntern import com.terning.feature.home.home.component.HomeUpcomingEmptyFilter @@ -101,6 +102,7 @@ fun HomeRoute( HomeScreen( paddingValues = paddingValues, navigateToIntern = { navController.navigateIntern(announcementId = it) }, + navigateToCalendar = { navController.navigateCalendar() }, viewModel = viewModel, ) } @@ -110,6 +112,7 @@ fun HomeRoute( fun HomeScreen( paddingValues: PaddingValues, navigateToIntern: (Long) -> Unit, + navigateToCalendar: () -> Unit, viewModel: HomeViewModel, ) { val homeState by viewModel.homeState.collectAsStateWithLifecycle() @@ -221,7 +224,8 @@ fun HomeScreen( ShowUpcomingIntern( homeUpcomingInternState = homeState.homeUpcomingInternState, homeState = homeState, - navigateToIntern = { navigateToIntern(it) } + navigateToIntern = { navigateToIntern(it) }, + navigateToCalendar = navigateToCalendar, ) } } @@ -390,11 +394,12 @@ private fun ShowUpcomingIntern( homeUpcomingInternState: UiState>, homeState: HomeState, navigateToIntern: (Long) -> Unit, + navigateToCalendar: () -> Unit, ) { when (homeUpcomingInternState) { is UiState.Success -> { if (homeUpcomingInternState.data.isEmpty()) { - HomeUpcomingEmptyIntern() + HomeUpcomingEmptyIntern(navigateToCalendar = navigateToCalendar) } else { HomeUpcomingInternScreen( internList = homeUpcomingInternState.data, diff --git a/feature/src/main/java/com/terning/feature/home/home/component/HomeUpcomingEmptyIntern.kt b/feature/src/main/java/com/terning/feature/home/home/component/HomeUpcomingEmptyIntern.kt index 601cb21aa..863488adc 100644 --- a/feature/src/main/java/com/terning/feature/home/home/component/HomeUpcomingEmptyIntern.kt +++ b/feature/src/main/java/com/terning/feature/home/home/component/HomeUpcomingEmptyIntern.kt @@ -22,11 +22,13 @@ import com.terning.core.designsystem.theme.TerningMain import com.terning.core.designsystem.theme.TerningTheme import com.terning.core.designsystem.theme.White import com.terning.core.extension.customShadow +import com.terning.core.extension.noRippleClickable import com.terning.feature.R @Composable fun HomeUpcomingEmptyIntern( modifier: Modifier = Modifier, + navigateToCalendar: () -> Unit, ) { Column( modifier = modifier @@ -64,7 +66,8 @@ fun HomeUpcomingEmptyIntern( width = 1.dp, color = TerningMain, shape = RoundedCornerShape(12.dp), - ), + ) + .noRippleClickable(navigateToCalendar), ) { Text( text = stringResource(id = R.string.home_upcoming_check_schedule),