// // ContentMainRankingView.swift // SodaLive // // Created by klaus on 2023/10/15. // import SwiftUI import Kingfisher struct ContentMainRankingView: View { let sorts: [String] let item: GetAudioContentRanking let selectSort: (String) -> Void @Binding var selectedSort: String let rows = [ GridItem(.fixed(60), alignment: .leading), GridItem(.fixed(60), alignment: .leading), GridItem(.fixed(60), alignment: .leading) ] var body: some View { VStack(spacing: 0) { HStack(spacing: 0) { Text("인기 콘텐츠") .font(.custom(Font.bold.rawValue, size: 18.3)) .foregroundColor(Color(hex: "eeeeee")) Spacer() Image("ic_forward") .onTapGesture { AppState.shared.setAppStep(step: .contentRankingAll) } } VStack(spacing: 8) { Text("\(item.startDate) ~ \(item.endDate)") .font(.custom(Font.bold.rawValue, size: 14.7)) .foregroundColor(Color(hex: "eeeeee")) Text("※ 인기 콘텐츠의 순위는 매주 업데이트됩니다.") .font(.custom(Font.light.rawValue, size: 13.3)) .foregroundColor(Color(hex: "bbbbbb")) } .padding(.vertical, 8) .frame(width: screenSize().width - 26.7) .background(Color(hex: "222222")) .padding(.top, 13.3) ContentMainRankingSortView(sorts: sorts, selectSort: selectSort, selectedSort: $selectedSort) .padding(.vertical, 16.7) ScrollView(.horizontal, showsIndicators: false) { LazyHGrid(rows: rows, spacing: 13.3) { ForEach(0..