Skip to content

Commit

Permalink
[REFACTOR/#42] 리뷰 기반 리팩토링
Browse files Browse the repository at this point in the history
  • Loading branch information
arinming committed Jul 12, 2024
1 parent 2964f86 commit c8eafbe
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.HorizontalDivider
Expand Down Expand Up @@ -96,8 +96,8 @@ fun ScrapDialogContent(
) {
Row(
modifier = Modifier
.width(60.dp)
.height(60.dp)
.aspectRatio(1f)
.size(60.dp)
.border(
width = 1.dp,
color = TerningMain,
Expand Down
12 changes: 7 additions & 5 deletions feature/src/main/java/com/terning/feature/intern/InternRoute.kt
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ fun InternScreen(
.padding(paddingValues)
) {
item {
val decimal = DecimalFormat("#,###")

Column(
modifier = modifier.padding(
top = 24.dp,
Expand Down Expand Up @@ -171,14 +169,16 @@ fun InternScreen(
color = Grey400
)
Text(
text = "${decimal.format(100000)}",
text = stringResource(
id = R.string.intern_view_count_detail,
DecimalFormat(DECIMAL_FORMAT)
),
style = TerningTheme.typography.button3,
color = Grey400,
)
}
}


Column(
verticalArrangement = Arrangement.Top,
) {
Expand Down Expand Up @@ -318,4 +318,6 @@ fun InternScreen(
}
}
}
}
}

const val DECIMAL_FORMAT = "#,###"
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.terning.core.designsystem.component.button.RoundButton
import com.terning.core.designsystem.theme.Grey150
Expand Down Expand Up @@ -77,7 +78,10 @@ fun InternBottomBar(
tint = if (isScrap) TerningMain else Grey350
)
Text(
text = "${viewCount}",
text = stringResource(
id = R.string.intern_view_count_detail,
viewCount
),
style = TerningTheme.typography.detail3,
color = Grey400
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Text
Expand Down Expand Up @@ -43,8 +45,8 @@ fun InternCompanyInfo(modifier: Modifier) {
Row(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier
.width(60.dp)
.height(60.dp)
.aspectRatio(1f)
.size(60.dp)
.border(
width = 1.dp,
color = TerningMain,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavHostController
import androidx.navigation.NavOptions
import androidx.navigation.compose.composable
import com.terning.core.navigation.MainTabRoute
import com.terning.core.navigation.Route
import com.terning.feature.intern.InternRoute
import kotlinx.serialization.Serializable

Expand All @@ -27,4 +27,4 @@ fun NavGraphBuilder.internNavGraph(
}

@Serializable
data object Intern : MainTabRoute
data object Intern : Route
1 change: 0 additions & 1 deletion feature/src/main/java/com/terning/feature/main/MainTab.kt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,5 @@ enum class MainTab(
fun contains(predicate: @Composable (Route) -> Boolean): Boolean {
return entries.map { it.route }.any { predicate(it) }
}

}
}
1 change: 1 addition & 0 deletions feature/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
<string name="intern_move_to_site">지원 사이트로 이동하기</string>
<string name="intern_top_app_bar_title">공고 정보</string>
<string name="intern_view_count">조회수</string>
<string name="intern_view_count_detail">%d회</string>
<string name="intern_info_d_day">서류 마감</string>
<string name="intern_info_working">근무 기간</string>
<string name="intern_info_start_date">근무 시작</string>
Expand Down

0 comments on commit c8eafbe

Please sign in to comment.