feat(home): AI 캐릭터 섹션을 연결한다
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user