2022-05-01 18:30:30 +02:00
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
struct HistoryView: View {
|
|
|
|
|
2023-04-11 18:18:31 +02:00
|
|
|
let manager: HistoryManagerProtocol
|
2022-05-01 18:30:30 +02:00
|
|
|
|
|
|
|
var body: some View {
|
2023-04-11 18:18:31 +02:00
|
|
|
NavigationView {
|
|
|
|
List(manager.loadEntries()) { entry in
|
|
|
|
HistoryListItem(entry: entry)
|
|
|
|
}
|
|
|
|
.navigationTitle("History")
|
2022-05-01 18:30:30 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
struct HistoryView_Previews: PreviewProvider {
|
|
|
|
static var previews: some View {
|
2023-04-11 18:18:31 +02:00
|
|
|
HistoryView(manager: HistoryManagerMock())
|
2022-05-01 18:30:30 +02:00
|
|
|
}
|
|
|
|
}
|