From b69a4542ac1385974742a3df145d59544be4b6f7 Mon Sep 17 00:00:00 2001 From: Mohammed Rokon Uddin Date: Fri, 9 Feb 2024 15:46:58 +0600 Subject: [PATCH] chore: rename property --- .../Features/Sources/App/AppClient.swift | 2 +- .../Features/Sources/App/AppFeature.swift | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/{{cookiecutter.app_name}}/Features/Sources/App/AppClient.swift b/{{cookiecutter.app_name}}/Features/Sources/App/AppClient.swift index 8919e67..574f364 100644 --- a/{{cookiecutter.app_name}}/Features/Sources/App/AppClient.swift +++ b/{{cookiecutter.app_name}}/Features/Sources/App/AppClient.swift @@ -30,7 +30,7 @@ extension AppClient { } extension DependencyValues { - public var productClient: AppClient { + public var appClient: AppClient { get { self[AppClient.self] } set { self[AppClient.self] = newValue } } diff --git a/{{cookiecutter.app_name}}/Features/Sources/App/AppFeature.swift b/{{cookiecutter.app_name}}/Features/Sources/App/AppFeature.swift index 3dcc0af..536ab2c 100644 --- a/{{cookiecutter.app_name}}/Features/Sources/App/AppFeature.swift +++ b/{{cookiecutter.app_name}}/Features/Sources/App/AppFeature.swift @@ -13,7 +13,7 @@ import Domain public struct AppFeature: FeatureReducer { - @Dependency(\.productClient) var productClient + @Dependency(\.appClient) var appClient public init() {} public struct State: Equatable, Hashable { @@ -48,12 +48,12 @@ public struct AppFeature: FeatureReducer { switch viewAction { case .onAppear: return .run { send in - await productClient.prepare(Void()) + await appClient.prepare(Void()) await send( .internal( .productResponse( TaskResult { - try await productClient.product(1) + try await appClient.product(1) }))) } case .showSheet: @@ -67,7 +67,7 @@ public struct AppFeature: FeatureReducer { case .save: return .run { [product = state.product] send in do { - try await productClient.save(product!) + try await appClient.save(product!) } catch { }