68 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Swift
		
	
	
	
	
	
			
		
		
	
	
			68 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Swift
		
	
	
	
	
	
//
 | 
						|
//  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
 | 
						|
            )
 | 
						|
        ]
 | 
						|
    )
 | 
						|
}
 |