diff --git a/feature/src/main/java/com/terning/feature/calendar/CalendarRoute.kt b/feature/src/main/java/com/terning/feature/calendar/CalendarRoute.kt index 92190caa1..c706c5715 100644 --- a/feature/src/main/java/com/terning/feature/calendar/CalendarRoute.kt +++ b/feature/src/main/java/com/terning/feature/calendar/CalendarRoute.kt @@ -24,6 +24,8 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel import com.terning.core.designsystem.theme.Grey200 +import com.terning.feature.calendar.component.CalendarTopBar +import com.terning.feature.calendar.component.WeekDaysHeader import com.terning.feature.calendar.models.CalendarState import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.launch diff --git a/feature/src/main/java/com/terning/feature/calendar/CalendarTopBar.kt b/feature/src/main/java/com/terning/feature/calendar/component/CalendarTopBar.kt similarity index 98% rename from feature/src/main/java/com/terning/feature/calendar/CalendarTopBar.kt rename to feature/src/main/java/com/terning/feature/calendar/component/CalendarTopBar.kt index a45309d84..c9730b832 100644 --- a/feature/src/main/java/com/terning/feature/calendar/CalendarTopBar.kt +++ b/feature/src/main/java/com/terning/feature/calendar/component/CalendarTopBar.kt @@ -1,4 +1,4 @@ -package com.terning.feature.calendar +package com.terning.feature.calendar.component import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box diff --git a/feature/src/main/java/com/terning/feature/calendar/WeekDaysHeader.kt b/feature/src/main/java/com/terning/feature/calendar/component/WeekDaysHeader.kt similarity index 94% rename from feature/src/main/java/com/terning/feature/calendar/WeekDaysHeader.kt rename to feature/src/main/java/com/terning/feature/calendar/component/WeekDaysHeader.kt index bb154e886..d4983af70 100644 --- a/feature/src/main/java/com/terning/feature/calendar/WeekDaysHeader.kt +++ b/feature/src/main/java/com/terning/feature/calendar/component/WeekDaysHeader.kt @@ -1,4 +1,4 @@ -package com.terning.feature.calendar +package com.terning.feature.calendar.component import androidx.compose.foundation.background import androidx.compose.foundation.layout.Row @@ -12,7 +12,6 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp -import androidx.compose.ui.unit.sp import com.terning.core.designsystem.theme.Black import com.terning.core.designsystem.theme.SundayRed import com.terning.core.designsystem.theme.TerningTheme @@ -44,7 +43,6 @@ fun WeekDaysHeader( text = stringResource(id = day), style = TerningTheme.typography.body7, color = if(day == R.string.calendar_text_sunday) SundayRed else Black, - fontSize = 13.sp, textAlign = TextAlign.Center ) } diff --git a/feature/src/main/java/com/terning/feature/calendar/models/CalendarState.kt b/feature/src/main/java/com/terning/feature/calendar/models/CalendarState.kt index bb8764f9e..98e3cfd94 100644 --- a/feature/src/main/java/com/terning/feature/calendar/models/CalendarState.kt +++ b/feature/src/main/java/com/terning/feature/calendar/models/CalendarState.kt @@ -40,13 +40,10 @@ class CalendarState internal constructor( } } - fun getPageCount(): Int { - return (END_YEAR - START_YEAR) * 12 - } + fun getPageCount(): Int = (END_YEAR - START_YEAR) * 12 - fun getInitialPage(): Int { - return (firstVisibleMonth.year - START_YEAR) * 12 + firstVisibleMonth.monthValue - 1 - } + fun getInitialPage(): Int = + (firstVisibleMonth.year - START_YEAR) * 12 + firstVisibleMonth.monthValue - 1 companion object { const val START_YEAR = 2020 diff --git a/feature/src/main/java/com/terning/feature/main/MainNavigator.kt b/feature/src/main/java/com/terning/feature/main/MainNavigator.kt index 472557036..2956286a2 100644 --- a/feature/src/main/java/com/terning/feature/main/MainNavigator.kt +++ b/feature/src/main/java/com/terning/feature/main/MainNavigator.kt @@ -10,6 +10,7 @@ import androidx.navigation.compose.currentBackStackEntryAsState import androidx.navigation.compose.rememberNavController import androidx.navigation.navOptions import com.terning.feature.calendar.navigation.navigateCalendar +import com.terning.feature.home.navigation.Home import com.terning.feature.home.navigation.navigateHome import com.terning.feature.mypage.navigation.navigateMyPage import com.terning.feature.onboarding.signin.navigation.SignIn @@ -22,7 +23,7 @@ class MainNavigator( @Composable get() = navController .currentBackStackEntryAsState().value?.destination - val startDestination = SignIn + val startDestination = Home val currentTab: MainTab? @Composable get() = MainTab.find { tab ->