Skip to content

Commit

Permalink
♻️ :: 테마에 따라서 404 image 띄우기
Browse files Browse the repository at this point in the history
  • Loading branch information
Cjsghkd committed Sep 18, 2023
1 parent 6eff6ea commit b72fc74
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ fun NotFoundScreen(
modifier: Modifier = Modifier,
navigateToMain: () -> Unit
) {
val imageRes = if (DotoriTheme.isSystemIsDarkTheme()) {
R.drawable.ic_404_dark
} else {
R.drawable.ic_404_light
}

Column(
modifier = modifier
.fillMaxSize()
Expand All @@ -34,7 +40,10 @@ fun NotFoundScreen(
verticalArrangement = Arrangement.Center
) {

Image(painter = painterResource(id = R.drawable.ic_404), contentDescription = "")
Image(
painter = painterResource(id = imageRes),
contentDescription = "404 image"
)
Spacer(modifier = Modifier.height(24.dp))
Text(
text = "요청하신 페이지를 찾을수 없습니다.",
Expand All @@ -59,5 +68,5 @@ fun NotFoundScreen(
@Preview
@Composable
fun NotFoundScreenPreview() {
NotFoundScreen{}
NotFoundScreen {}
}

0 comments on commit b72fc74

Please sign in to comment.