@@ -96,7 +96,7 @@ final class BoosterOpenedViewController: UIViewController {
9696 collectionView. clipsToBounds = false
9797 collectionView. dataSource = self
9898 collectionView. delegate = self
99- collectionView. register ( OpenBoosterCardCell . self, forCellWithReuseIdentifier: OpenBoosterCardCell . identifier)
99+ collectionView. register ( CardCell . self, forCellWithReuseIdentifier: CardCell . identifier)
100100
101101 view. addSubview ( collectionView)
102102 collectionView. pinTop ( to: totalLabel. bottomAnchor, 8 )
@@ -157,17 +157,26 @@ extension BoosterOpenedViewController: UICollectionViewDataSource, UICollectionV
157157
158158 func collectionView( _ collectionView: UICollectionView , cellForItemAt indexPath: IndexPath ) -> UICollectionViewCell {
159159 let cell = collectionView. dequeueReusableCell (
160- withReuseIdentifier: OpenBoosterCardCell . identifier,
160+ withReuseIdentifier: CardCell . identifier,
161161 for: indexPath
162- ) as! OpenBoosterCardCell
162+ ) as! CardCell
163163
164164 let booster = boosterData [ indexPath. item]
165- cell. cardView. configure (
165+ // Преобразуем UserBooster в Card (заполняем тестовыми данными)
166+ let card = Card (
167+ id: UUID ( ) . uuidString,
168+ name: booster. setCode, // временно используем setCode как имя
169+ type_line: booster. type. rawValue,
170+ mana_cost: nil ,
171+ oracle_text: nil ,
172+ rarity: nil ,
166173 set: booster. setCode,
167- type: booster. type. rawValue,
168- count: 1 ,
169- color: UIColor . fromHexString ( booster. colorHex ?? " " ) ?? . systemBlue
174+ set_name: nil ,
175+ image_url: nil ,
176+ price_usd: nil ,
177+ count: 1
170178 )
179+ cell. configure ( with: card)
171180 return cell
172181 }
173182
0 commit comments