Skip to content

Commit

Permalink
chore: use Row
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannijunseokim committed May 7, 2024
1 parent 6a31f66 commit 7b06cdc
Showing 1 changed file with 29 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package univ.earthbreaker.namu.feature.mission
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
Expand All @@ -14,10 +15,7 @@ import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.withStyle
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
Expand All @@ -39,28 +37,29 @@ fun MissionCertificationResultDialog(
horizontalAlignment = Alignment.CenterHorizontally,
) {
Spacer(modifier = Modifier.height(30.dp))
Text(
text = if (isSuccessful) buildAnnotatedString {
append("미션 인증에 ")
withStyle(style = SpanStyle(color = GTTheme.colors.green1)){
append("성공")
}
append("했습니다!")
Row {
Text("미션 인증에 ", style = GTTheme.typography.titleSemiBold18)
if (isSuccessful) {
Text(
text = "성공",
style = GTTheme.typography.titleSemiBold18,
color = GTTheme.colors.green1

Check failure on line 46 in app/src/main/java/univ/earthbreaker/namu/feature/mission/MissionCertificationResultDialog.kt

View workflow job for this annotation

GitHub Actions / Check Code Quality

[ktlint] reported by reviewdog 🐶 Missing trailing comma before ")" Raw Output: app/src/main/java/univ/earthbreaker/namu/feature/mission/MissionCertificationResultDialog.kt:46:54: error: Missing trailing comma before ")" (standard:trailing-comma-on-call-site)
)
Text(text = "했습니다!", style = GTTheme.typography.titleSemiBold18)
} else {
Text(
text = "실패",
style = GTTheme.typography.titleSemiBold18,
color = GTTheme.colors.red1

Check failure on line 53 in app/src/main/java/univ/earthbreaker/namu/feature/mission/MissionCertificationResultDialog.kt

View workflow job for this annotation

GitHub Actions / Check Code Quality

[ktlint] reported by reviewdog 🐶 Missing trailing comma before ")" Raw Output: app/src/main/java/univ/earthbreaker/namu/feature/mission/MissionCertificationResultDialog.kt:53:52: error: Missing trailing comma before ")" (standard:trailing-comma-on-call-site)
)
Text(text = "했습니다.", style = GTTheme.typography.titleSemiBold18)
}
else buildAnnotatedString {
append("미션 인증에 ")
withStyle(style = SpanStyle(color = GTTheme.colors.red1)){
append("실패")
}
append("했습니다.")
},
style = GTTheme.typography.bodyMedium16,
textAlign = TextAlign.Center,
)
}
Spacer(modifier = Modifier.height(10.dp))
Text(
text = reason,
style = GTTheme.typography.detailMedium14,
color = GTTheme.colors.gray6,
textAlign = TextAlign.Center,
)
Spacer(modifier = Modifier.height(30.dp))
Expand Down Expand Up @@ -90,13 +89,21 @@ fun MissionCertificationResultDialog(
private fun MissionCertificationResultIsSuccessfulDialogDialogPreview() {
Column(modifier = Modifier.fillMaxSize()) {
}
MissionCertificationResultDialog(onDismissRequest = {}, isSuccessful = true, reason = "성공한 이유가 여기에 3줄로 표시됨")
MissionCertificationResultDialog(
onDismissRequest = {},
isSuccessful = true,
reason = "성공한 이유가 여기에 3줄로 표시됨"

Check failure on line 95 in app/src/main/java/univ/earthbreaker/namu/feature/mission/MissionCertificationResultDialog.kt

View workflow job for this annotation

GitHub Actions / Check Code Quality

[ktlint] reported by reviewdog 🐶 Missing trailing comma before ")" Raw Output: app/src/main/java/univ/earthbreaker/namu/feature/mission/MissionCertificationResultDialog.kt:95:39: error: Missing trailing comma before ")" (standard:trailing-comma-on-call-site)
)
}

@Preview
@Composable
private fun MissionCertificationResultIsNotSuccessfulDialogDialogPreview() {
Column(modifier = Modifier.fillMaxSize()) {
}
MissionCertificationResultDialog(onDismissRequest = {}, isSuccessful = false, reason = "실패한 이유가 여기에 3줄로 표시됨")
MissionCertificationResultDialog(
onDismissRequest = {},
isSuccessful = false,
reason = "실패한 이유가 여기에 3줄로 표시됨"

Check failure on line 107 in app/src/main/java/univ/earthbreaker/namu/feature/mission/MissionCertificationResultDialog.kt

View workflow job for this annotation

GitHub Actions / Check Code Quality

[ktlint] reported by reviewdog 🐶 Missing trailing comma before ")" Raw Output: app/src/main/java/univ/earthbreaker/namu/feature/mission/MissionCertificationResultDialog.kt:107:39: error: Missing trailing comma before ")" (standard:trailing-comma-on-call-site)
)
}

0 comments on commit 7b06cdc

Please sign in to comment.