Skip to content

Commit

Permalink
✨ 상대방 페이지 확인 시 전체 뱃지 보이지 않도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yonghanJu committed Jun 20, 2024
1 parent a5894da commit 8b9210f
Showing 1 changed file with 28 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,16 @@ fun MyPageScreen(
)
}

/**
* User page content
*
* @param nickname 상대방 페이지인 경우에 존재, 마이페이지일 경우 null
*/
@SuppressLint("CoroutineCreationDuringComposition")
@OptIn(ExperimentalFoundationApi::class)
@Composable
fun UserPageContent(
nickname: String? = null,
nickname: String? = null, // 상대방 페이지인 경우에 존재, 마이페이지일 경우 null
state: UserPageState,
onPostPreviewClicked: (id: Long) -> Unit = {},
onPostCreateClicked: () -> Unit = {},
Expand Down Expand Up @@ -300,25 +305,29 @@ fun UserPageContent(
}
repeat(5 - badgeList.size) { PlaceholderBadge() }
}
Spacer(modifier = Modifier.height(12.dp))

Box(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 20.dp)
.clip(RoundedCornerShape(12.dp))
.clickable(enabled = badgeList.size >= 5) {
// TODO 전체 뱃지 페이지로 이동
}
.background(WalkieColor.GrayBackground)
.padding(vertical = 8.dp),
contentAlignment = Alignment.Center
) {
Text(
text = "전체 뱃지 보기" + if (badgeList.size < 5) "(${badgeList.size}/5)" else "",
fontSize = 14.sp,
color = if (badgeList.size < 5) WalkieColor.GrayBorder else Color.Black
)
// 마이페이지인 경우
if (nickname == null) {
Spacer(modifier = Modifier.height(12.dp))

Box(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 20.dp)
.clip(RoundedCornerShape(12.dp))
.clickable(enabled = badgeList.size >= 5) {
// TODO 전체 뱃지 페이지로 이동
}
.background(WalkieColor.GrayBackground)
.padding(vertical = 8.dp),
contentAlignment = Alignment.Center
) {
Text(
text = "전체 뱃지 보기" + if (badgeList.size < 5) "(${badgeList.size}/5)" else "",
fontSize = 14.sp,
color = if (badgeList.size < 5) WalkieColor.GrayBorder else Color.Black
)
}
}

Spacer(Modifier.height(12.dp))
Expand Down

0 comments on commit 8b9210f

Please sign in to comment.