2023-05-29 18:23:13 +02:00
|
|
|
import SwiftUI
|
|
|
|
|
2023-06-08 09:52:20 +02:00
|
|
|
let storage = TemperatureStorage()
|
|
|
|
let bluetoothClient = BluetoothClient()
|
|
|
|
|
2023-05-29 18:23:13 +02:00
|
|
|
@main
|
|
|
|
struct TempTrackApp: App {
|
2023-06-08 09:52:20 +02:00
|
|
|
|
2023-05-29 18:23:13 +02:00
|
|
|
var body: some Scene {
|
|
|
|
WindowGroup {
|
|
|
|
ContentView()
|
2023-06-08 09:52:20 +02:00
|
|
|
.environmentObject(storage)
|
|
|
|
.environmentObject(bluetoothClient)
|
|
|
|
.onAppear {
|
|
|
|
bluetoothClient.delegate = storage
|
|
|
|
}
|
2023-05-29 18:23:13 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|