Last active
June 6, 2019 12:24
-
-
Save Jpunt/060dfe00ec059f44b8639885227e1d59 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var body: some View { | |
List(tweets.identified(by: \.id)) { tweet in | |
HStack { | |
Text(tweet.message) | |
tweet.imageName.map | |
{ ViewBuilder.buildEither(first: Image($0) } | |
?? ViewBuilder.buildEither(second: Text("No image")) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment