So I'm trying to make a Text link clickable. I can get it working if I hardcode the link, but if I replace it with a variable it no longer become clickable.
What I've tried so far
if let obtainedFrom = project.obtainedFrom {
if let obtainedFromURL = project.obtainedURL {
Text("Obtained From URL: [\(obtainedFrom)](\(obtainedFromURL))") // Not clickable
Text("Obtained From URL: [\(obtainedFrom)](https://news.google.com)") // Works
Text("Obtained From URL: \(obtainedFrom) - \(obtainedFromURL)")
} else {
Text("Obtained From: \(obtainedFrom)")
}
}