Conversation
|
|
||
| import SwiftUI | ||
|
|
||
| struct WorkshopDetailsView: View { |
There was a problem hiding this comment.
let's make this just DetailView and have the SwiftUI previews
| MACOSX_DEPLOYMENT_TARGET = 12.3; | ||
| MARKETING_VERSION = 1.0; | ||
| PRODUCT_BUNDLE_IDENTIFIER = com.niveumlabs.deepa; | ||
| PRODUCT_BUNDLE_IDENTIFIER = com.donchia.deepa; |
There was a problem hiding this comment.
woops, don't commit this lol
| ForEach(viewModel.schedule) { information in | ||
| if Self.extractDate.string(from: information.startAt ?? Date.now) == "20/01/2022" { | ||
| VStack { | ||
| NavigationLink(destination: WorkshopDetailsView(title: information.title, startAt: information.startAt ?? Date.now, endAt: information.endAt ?? Date.now, talkDescription: information.talkDescription ?? "", activityName: information.activityName ?? "", speakers: information.speakers)) { |
There was a problem hiding this comment.
Could you rename information to talk? structurally, a schedule is made up of talks.
then ... WorkshopDetailsView / DetailView takes the entire talk and decides how to render the talk
| if Self.extractDate.string(from: information.startAt ?? Date.now) == "20/01/2022" { | ||
| VStack { | ||
| NavigationLink(destination: WorkshopDetailsView(title: information.title, startAt: information.startAt ?? Date.now, endAt: information.endAt ?? Date.now, talkDescription: information.talkDescription ?? "", activityName: information.activityName ?? "", speakers: information.speakers)) { | ||
| ListContent(title: information.title, speakers: information.speakers, startAt: information.startAt ?? Date.now, endAt: information.endAt ?? Date.now) |
There was a problem hiding this comment.
same as ListContent can be more specific named as TalkContent and takes the entire Talk
| .cornerRadius(6) | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
I'd like to have the preview here too, something like this will be nice
struct WorkshopDetailsView_Previews: PreviewProvider {
static var previews: some View {
NavigationView {
WorkshopDetailsView(
title: "Awesome talk title",
startAt: Date(timeIntervalSinceNow: 1),
endAt: Date(timeIntervalSinceNow: 20),
talkDescription: "Lorem ipsum",
activityName: "normalTalk",
speakers: [
Speaker(
id: 90,
name: "Kale",
twitter: "kale",
company: "iOS Conf Sg",
imageUrl: "https://iosconf.sg/images/organisers/kale.jpeg"
)
])
}
}
}| func getURL2022(speakerImageURL: String) -> String { | ||
| if speakerImageURL.count > 0 { | ||
| var url = speakerImageURL | ||
| for (index, char) in "2022.".enumerated() { |
There was a problem hiding this comment.
LOL this is a big no .... we should fix the backend value instead and not hard coding it
No description provided.