// // SectionRecommendChannelView.swift // SodaLive // // Created by klaus on 2023/08/09. // import SwiftUI import Kingfisher struct SectionRecommendChannelView: View { let items: [GetRecommendChannelResponse] @Binding var isFollowingList: Bool @AppStorage("token") private var token: String = UserDefaults.string(forKey: UserDefaultsKey.token) var body: some View { VStack(spacing: 21.3) { HStack(spacing: 0) { if isFollowingList { Text("팔로잉 ") .font(.custom(Font.bold.rawValue, size: 18.3)) .foregroundColor(.grayee) } else { Text("추천 ") .font(.custom(Font.bold.rawValue, size: 18.3)) .foregroundColor(.grayee) } Text("채널") .font(.custom(Font.bold.rawValue, size: 18.3)) .foregroundColor(.button) Spacer() if !token.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty { Text("팔로잉 채널") .font(.custom(Font.medium.rawValue, size: 13.3)) .foregroundColor(.gray77) Image(isFollowingList ? "btn_toggle_on_big" : "btn_toggle_off_big") .resizable() .frame(width: 33.3, height: 20) .padding(.leading, 6.7) .onTapGesture { isFollowingList.toggle() } } } .frame(width: screenSize().width - 26.7, alignment: .leading) ScrollView(.horizontal, showsIndicators: false) { HStack(spacing: 21.3) { ForEach(0..