feat(home): AI 캐릭터 섹션을 연결한다

This commit is contained in:
Yu Sung
2026-06-29 18:56:35 +09:00
parent 638aa26789
commit 561e991050
7 changed files with 256 additions and 39 deletions

View File

@@ -33,20 +33,19 @@ struct MainHomeRecentDebutCreatorSection: View {
}
private struct MainHomeRecentDebutCreatorItemView: View {
private static let itemWidth: CGFloat = 185
private static let itemHeight: CGFloat = 234
let item: HomeCreatorItem
let action: () -> Void
var body: some View {
let itemSize = AiCharacterCard.responsiveSize()
Button(action: action) {
ZStack(alignment: .bottom) {
DownsampledKFImage(
url: URL(string: item.creatorProfileImage),
size: CGSize(width: Self.itemWidth, height: Self.itemHeight)
size: itemSize
)
.frame(width: Self.itemWidth, height: Self.itemHeight)
.frame(width: itemSize.width, height: itemSize.height)
.background(Color.gray800)
.clipShape(RoundedRectangle(cornerRadius: SodaSpacing.s14, style: .continuous))
@@ -55,7 +54,7 @@ private struct MainHomeRecentDebutCreatorItemView: View {
startPoint: .top,
endPoint: .bottom
)
.frame(height: 80)
.frame(height: min(80, itemSize.height))
Text(item.creatorNickname)
.appFont(.heading4)
@@ -65,7 +64,7 @@ private struct MainHomeRecentDebutCreatorItemView: View {
.padding(.horizontal, SodaSpacing.s12)
.padding(.bottom, SodaSpacing.s20)
}
.frame(width: Self.itemWidth, height: Self.itemHeight)
.frame(width: itemSize.width, height: itemSize.height)
.clipShape(RoundedRectangle(cornerRadius: SodaSpacing.s14, style: .continuous))
}
.buttonStyle(.plain)