46 lines
1.3 KiB
Swift
46 lines
1.3 KiB
Swift
//
|
|
// ContentMainNewContentCreatorItemView.swift
|
|
// SodaLive
|
|
//
|
|
// Created by klaus on 2023/08/11.
|
|
//
|
|
|
|
import SwiftUI
|
|
import Kingfisher
|
|
|
|
struct ContentMainNewContentCreatorItemView: View {
|
|
|
|
let item: GetNewContentUploadCreator
|
|
|
|
var body: some View {
|
|
VStack(spacing: 8) {
|
|
KFImage(URL(string: item.creatorProfileImageUrl))
|
|
.resizable()
|
|
.scaledToFill()
|
|
.frame(width: screenSize().width * 0.18, height: screenSize().width * 0.18, alignment: .top)
|
|
.clipShape(Circle())
|
|
|
|
Text(item.creatorNickname)
|
|
.font(.custom(Font.medium.rawValue, size: 11.3))
|
|
.foregroundColor(Color(hex: "bbbbbb"))
|
|
.frame(width: screenSize().width * 0.18)
|
|
.lineLimit(1)
|
|
}
|
|
.onTapGesture {
|
|
AppState.shared.setAppStep(step: .creatorDetail(userId: item.creatorId))
|
|
}
|
|
}
|
|
}
|
|
|
|
struct ContentMainNewContentCreatorItemView_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
ContentMainNewContentCreatorItemView(
|
|
item: GetNewContentUploadCreator(
|
|
creatorId: 2,
|
|
creatorNickname: "수다친구112",
|
|
creatorProfileImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png"
|
|
)
|
|
)
|
|
}
|
|
}
|