Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
struct TickerTextView: View {
let ticker: Ticker
var body: some View {
Group {
Text(ticker.market.name)
Text("""
\(ticker.base.rawValue) <-> \(ticker.target)
\(ticker.last)
""")
.font(.largeTitle)
.multilineTextAlignment(.center)
Text("Volume: \(ticker.volume)")
}
}
}
struct RefreshView: View {
@EnvironmentObject var dataModel: DataModel
var body: some View {
Group {
Button("↻ Refresh", action: dataModel.refresh)
Text(dataModel.lastRefreshed)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment