Skip to content

Commit

Permalink
[feature/#1011] 에러 케이스 텍스트 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
leeeyubin committed Dec 31, 2024
1 parent 97ca26e commit 81ea70e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
*/
package org.sopt.official.feature.auth.component

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
Expand All @@ -43,8 +45,10 @@ import androidx.compose.runtime.remember
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.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import org.sopt.official.R.drawable.ic_auth_certification_error
import org.sopt.official.designsystem.Black60
import org.sopt.official.designsystem.Gray10
import org.sopt.official.designsystem.Gray100
Expand Down Expand Up @@ -92,7 +96,8 @@ internal fun AuthTextField(
if (labelText.isEmpty()) {
Text(
text = hintText,
color = Gray100
color = Gray100,
style = SoptTheme.typography.body16M
)
}

Expand All @@ -111,11 +116,20 @@ internal fun AuthTextField(
}
if (isError && !errorMessage.isNullOrEmpty()) {
Spacer(modifier = Modifier.height(8.dp))
Text(
text = errorMessage,
color = SoptTheme.colors.error,
style = SoptTheme.typography.label12SB,
)
Row(
horizontalArrangement = Arrangement.spacedBy(6.dp),
verticalAlignment = Alignment.CenterVertically
) {
Image(
painterResource(id = ic_auth_certification_error),
contentDescription = "에러 아이콘",
)
Text(
text = errorMessage,
color = SoptTheme.colors.error,
style = SoptTheme.typography.label12SB,
)
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import kotlinx.coroutines.launch
import org.sopt.official.R.drawable.ic_auth_certification_error
import org.sopt.official.R.drawable.ic_auth_memeber_error
import org.sopt.official.R.drawable.ic_auth_process
import org.sopt.official.designsystem.Blue500
Expand All @@ -58,7 +57,6 @@ import org.sopt.official.designsystem.Gray100
import org.sopt.official.designsystem.Gray60
import org.sopt.official.designsystem.Gray80
import org.sopt.official.designsystem.Gray950
import org.sopt.official.designsystem.Red100
import org.sopt.official.designsystem.SoptTheme
import org.sopt.official.designsystem.White
import org.sopt.official.feature.auth.component.AuthButton
Expand Down Expand Up @@ -107,7 +105,7 @@ fun CertificateMemberScreen() {
modifier = Modifier.fillMaxWidth(),
labelText = "",
hintText = "인증번호를 입력해 주세요.",
onTextChange = {}
onTextChange = {},
)
Spacer(modifier = Modifier.height(41.dp))
AuthButton(
Expand Down Expand Up @@ -197,27 +195,6 @@ private fun TopBar(
}
}

@Composable
private fun ErrorText(
error: ErrorCase
) {
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.spacedBy(6.dp),
verticalAlignment = Alignment.CenterVertically
) {
Image(
painterResource(id = ic_auth_certification_error),
contentDescription = "에러 아이콘",
)
Text(
text = error.message,
color = Red100,
style = SoptTheme.typography.label12SB
)
}
}

enum class ErrorCase(val message: String) {
CODE_ERROR("인증번호가 일치하지 않아요.\n번호를 확인한 후 다시 입력해 주세요."),
PHONE_ERROR("솝트 활동 시 사용한 전화번호가 아니예요.\n인증을 실패하신 경우 하단에서 다른 방법으로 인증할 수 있어요."),
Expand Down

0 comments on commit 81ea70e

Please sign in to comment.