// // ChatListCellView.swift // Chat (iOS) // // Created by Sergey Tarasov on 14.10.2022. // import SwiftUI struct ChatListCellView: View { let nickname: String let jid: String var body: some View { NavigationLink { ChatView(store: ChatStore(with: jid)) } label: { HStack { Image(systemName: "person.crop.circle") .resizable() .scaledToFit() .foregroundColor(.secondary.opacity(0.5)) Text(nickname) Spacer() } .foregroundColor(.primary) .frame(height: 30) } } } struct ChatListCellView_Previews: PreviewProvider { static var previews: some View { ChatListCellView(nickname: "Nickname", jid: "user@domain.com") .padding() .previewLayout(.sizeThatFits) } }