diff --git a/NucleicRemote/NucleicRemote/Views/HomeView.swift b/NucleicRemote/NucleicRemote/Views/HomeView.swift index 09686bd..ac92f82 100644 --- a/NucleicRemote/NucleicRemote/Views/HomeView.swift +++ b/NucleicRemote/NucleicRemote/Views/HomeView.swift @@ -128,13 +128,26 @@ private struct InProgressSessions: View { } private struct StatCard: View { - let value: Int + let value: String let label: String let icon: String + + init(value: Int, label: String, icon: String) { + self.value = "\(value)" + self.label = label + self.icon = icon + } + + init(value: String, label: String, icon: String) { + self.value = value + self.label = label + self.icon = icon + } + var body: some View { VStack(alignment: .leading, spacing: 4) { Image(systemName: icon).foregroundStyle(Palette.accent) - Text("\(value)").font(.title2.weight(.semibold).monospacedDigit()) + Text(value).font(.title2.weight(.semibold).monospacedDigit()) Text(label).font(.caption).foregroundStyle(.secondary) } .frame(maxWidth: .infinity, alignment: .leading)