I have the next class in the file UserResponse.swift
import Foundation
import UIKit
import SwiftUI
struct UserResponse: Hashable, Codable, Identifiable {
var id: Int
var name: String
var profileImage: String
var email: String
var likes: String
var text: String
}
And I used it in another file and error appear for this ’ Value of type UserResponse[1] has no subscripts’
struct Cell_Previews: PreviewProvider {
static var previews: some View {
Cell(user: UserResponse[1])
}
}
Could anyone help pls?!