// // LiveRoomDonationRankingDialog.swift // SodaLive // // Created by klaus on 2023/08/15. // import SwiftUI struct LiveRoomDonationRankingDialog: View { @Binding var isShowing: Bool @StateObject var viewModel = LiveRoomViewModel() let columns = [GridItem(.flexible())] var body: some View { ZStack { VStack(spacing: 0) { HStack(spacing: 0) { Text("현재 라이브 후원랭킹") .font(.custom(Font.bold.rawValue, size: 14.7)) .foregroundColor(Color(hex: "eeeeee")) Spacer() Image("ic_close_white") .onTapGesture { isShowing = false } } if let donationStatus = viewModel.donationStatus { LiveRoomDonationRankingTotalCanView(totalCan: donationStatus.totalCan) .padding(.top, 25) HStack(spacing: 0) { Text("전체") .font(.custom(Font.medium.rawValue, size: 14.7)) .foregroundColor(Color(hex: "eeeeee")) Text("\(donationStatus.totalCount)") .font(.custom(Font.medium.rawValue, size: 12)) .foregroundColor(Color(hex: "9970ff")) .padding(.leading, 6.7) Text("명") .font(.custom(Font.medium.rawValue, size: 12)) .foregroundColor(Color(hex: "777777")) Spacer() } .padding(.top, 13.3) ScrollView(showsIndicators: false) { LazyVGrid(columns: columns, spacing: 0) { ForEach(0..