feat: 메인 라이브

- 라이브 다시 듣기 UI 추가
This commit is contained in:
Yu Sung
2025-07-22 03:42:40 +09:00
parent a744376847
commit 0b04aa20a3
5 changed files with 77 additions and 6 deletions

View File

@@ -0,0 +1,67 @@
//
// LiveReplayListView.swift
// SodaLive
//
// Created by klaus on 7/22/25.
//
import SwiftUI
struct LiveReplayListView: View {
let contentList: [AudioContentMainItem]
let rows = [
GridItem(.flexible(), alignment: .leading),
GridItem(.flexible(), alignment: .leading)
]
var body: some View {
VStack(spacing: 14) {
HStack(spacing: 0) {
Text("라이브")
.font(.custom(Font.preBold.rawValue, size: 24))
.foregroundColor(.button)
Text(" 다시 듣기")
.font(.custom(Font.preBold.rawValue, size: 24))
.foregroundColor(.white)
Spacer()
}
.padding(.horizontal, 24)
ScrollView(.horizontal, showsIndicators: false) {
LazyHGrid(rows: rows, spacing: 16) {
ForEach(0..<contentList.count, id: \.self) { index in
ContentItemView(item: contentList[index])
}
}
.padding(.horizontal, 24)
}
}
}
}
#Preview {
LiveReplayListView(
contentList: [
AudioContentMainItem(
contentId: 1,
creatorId: 3,
title: "ㅓ처랴햐햫햐햐",
coverImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png",
creatorNickname: "유저1",
isPointAvailable: true
),
AudioContentMainItem(
contentId: 2,
creatorId: 8,
title: "ㅓ처랴햐햫햐햐",
coverImageUrl: "https://test-cf.sodalive.net/profile/default-profile.png",
creatorNickname: "유저2",
isPointAvailable: false
)
]
)
}