Use the new @Entry macro everywhere.

Fix analytics service optionality.
This commit is contained in:
Doug
2024-10-01 13:34:16 +01:00
committed by Doug
parent e0ee4be834
commit 77e4fae2fb
4 changed files with 4 additions and 45 deletions
@@ -7,13 +7,6 @@
import SwiftUI
private struct AnalyticsServiceKey: EnvironmentKey {
static let defaultValue: AnalyticsService = ServiceLocator.shared.analytics
}
extension EnvironmentValues {
var analyticsService: AnalyticsService {
get { self[AnalyticsServiceKey.self] }
set { self[AnalyticsServiceKey.self] = newValue }
}
@Entry var analyticsService: AnalyticsService = ServiceLocator.shared.analytics
}