52 lines
1.4 KiB
Swift
52 lines
1.4 KiB
Swift
//
|
|
// LatestFinishedLiveItemView.swift
|
|
// SodaLive
|
|
//
|
|
// Created by klaus on 7/22/25.
|
|
//
|
|
|
|
import SwiftUI
|
|
import Kingfisher
|
|
|
|
struct LatestFinishedLiveItemView: View {
|
|
|
|
let item: GetLatestFinishedLiveResponse
|
|
|
|
var body: some View {
|
|
VStack(spacing: 0) {
|
|
KFImage(URL(string: item.profileImageUrl))
|
|
.cancelOnDisappear(true)
|
|
.resizable()
|
|
.scaledToFill()
|
|
.frame(width: 84, height: 84, alignment: .top)
|
|
.clipShape(Circle())
|
|
|
|
Text(item.nickname)
|
|
.font(.custom(Font.preRegular.rawValue, size: 16))
|
|
.foregroundColor(.white)
|
|
.padding(.top, 20)
|
|
|
|
Spacer()
|
|
|
|
Text(item.timeAgo)
|
|
.font(.custom(Font.preRegular.rawValue, size: 16))
|
|
.foregroundColor(Color(hex: "78909C"))
|
|
}
|
|
.padding(16)
|
|
.frame(width: 144, height: 204)
|
|
.background(Color(hex: "263238"))
|
|
.cornerRadius(16)
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
LatestFinishedLiveItemView(
|
|
item: GetLatestFinishedLiveResponse(
|
|
memberId: 1,
|
|
nickname: "크리에이터 1",
|
|
profileImageUrl: "https://cf.sodalive.net/profile/34638/34638-profile-5bfc2bac-3278-48f8-b60c-1294b615f629-8832-1751707083877",
|
|
timeAgo: "5분전"
|
|
)
|
|
)
|
|
}
|