Files
sodalive-ios/SodaLive/Sources/Content/Detail/ContentDetailCreatorProfileView.swift
Yu Sung 280e424385 커스텀 폰트 pretendard-medium, gmarket-medium를 사용하고 있던 것을 appFont 모디
파이어를 사용하여 한국어는 pretendard, 그 외에는 시스템 폰트를 사용하도록 수정
2026-01-23 03:09:20 +09:00

56 lines
1.6 KiB
Swift

//
// ContentDetailCreatorProfileView.swift
// SodaLive
//
// Created by klaus on 2023/08/11.
//
import SwiftUI
import Kingfisher
struct ContentDetailCreatorProfileView: View {
let creator: AudioContentCreator
let onClickFollow: (Int) -> Void
let showCreatorFollowNotifyDialog: (Int) -> Void
var body: some View {
HStack(spacing: 0) {
KFImage(URL(string: creator.profileImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 26.7,
height: 26.7
)
)
.resizable()
.frame(width: 26.7, height: 26.7)
.clipShape(Circle())
Text(creator.nickname)
.appFont(size: 12, weight: .medium)
.foregroundColor(Color.gray77)
.padding(.horizontal, 5.3)
Spacer()
if creator.creatorId != UserDefaults.int(forKey: .userId) {
let asset = FollowButtonImageAsset(
type: creator.isFollow
? (creator.isNotify ? .following : .followingNoAlarm)
: .follow
)
asset.imageView()
.onTapGesture {
if creator.isFollowing {
showCreatorFollowNotifyDialog(creator.creatorId)
} else {
onClickFollow(creator.creatorId)
}
}
}
}
}
}