feat(home): 장르 크리에이터 섹션을 연결한다

This commit is contained in:
Yu Sung
2026-06-29 20:47:46 +09:00
parent 561e991050
commit 2727cdc7cb
8 changed files with 225 additions and 12 deletions

View File

@@ -4,17 +4,23 @@ struct CreatorProfileItem: View {
let imageUrl: String?
let name: String
let subtitle: String?
let imageSize: CGSize
let spacing: CGFloat
let action: (() -> Void)?
init(
imageUrl: String?,
name: String,
subtitle: String? = nil,
imageSize: CGSize = CGSize(width: 72, height: 72),
spacing: CGFloat = SodaSpacing.s8,
action: (() -> Void)? = nil
) {
self.imageUrl = imageUrl
self.name = name
self.subtitle = subtitle
self.imageSize = imageSize
self.spacing = spacing
self.action = action
}
@@ -22,7 +28,7 @@ struct CreatorProfileItem: View {
Button {
action?()
} label: {
VStack(alignment: .center, spacing: SodaSpacing.s8) {
VStack(alignment: .center, spacing: spacing) {
profileImage
VStack(alignment: .center, spacing: 2) {
@@ -48,7 +54,7 @@ struct CreatorProfileItem: View {
}
private var profileImage: some View {
DownsampledKFImage(url: URL(string: imageUrl ?? ""), size: CGSize(width: 72, height: 72))
DownsampledKFImage(url: URL(string: imageUrl ?? ""), size: imageSize)
.background(Color.gray800)
.clipShape(Circle())
}