33 lines
708 B
Swift
33 lines
708 B
Swift
//
|
|
// ContentView.swift
|
|
// TrashTrack
|
|
//
|
|
// Created by Oliver Hnát on 12.01.2024.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct MainView: View {
|
|
var model = TrashModelView()
|
|
var body: some View {
|
|
VStack {
|
|
ForEach(model.getTrashEvents()) { trashEvent in
|
|
HStack {
|
|
Image(systemName: trashEvent.trash.image)
|
|
.imageScale(.large)
|
|
.foregroundStyle(.tint)
|
|
VStack {
|
|
Text(trashEvent.trash.type)
|
|
Text(trashEvent.date.ISO8601Format())
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.padding()
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
MainView()
|
|
}
|