-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: 고양이선택, 고양이 이름짓기 stream listener 연결
- Loading branch information
Showing
10 changed files
with
232 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
Projects/Feature/ErrorFeature/Sources/NetworkError/NetworkErrorCore.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// | ||
// NetworkErrorCore.swift | ||
// ErrorFeature | ||
// | ||
// Created by 김지현 on 11/24/24. | ||
// Copyright © 2024 PomoNyang. All rights reserved. | ||
// | ||
|
||
import ComposableArchitecture | ||
|
||
@Reducer | ||
public struct NetworkErrorCore { | ||
@ObservableState | ||
public struct State: Equatable { | ||
public init() { } | ||
} | ||
|
||
public enum Action { | ||
case tryAgain | ||
} | ||
|
||
public init() { } | ||
|
||
public var body: some ReducerOf<Self> { | ||
Reduce(self.core) | ||
} | ||
|
||
private func core(_ state: inout State, _ action: Action) -> EffectOf<Self> { | ||
switch action { | ||
case .tryAgain: | ||
return .none | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
Projects/Feature/ErrorFeature/Sources/RequestError/RequestErrorCore.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// | ||
// RequestErrorCore.swift | ||
// ErrorFeature | ||
// | ||
// Created by 김지현 on 11/24/24. | ||
// Copyright © 2024 PomoNyang. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
import ComposableArchitecture | ||
|
||
@Reducer | ||
public struct RequestErrorCore { | ||
@ObservableState | ||
public struct State: Equatable { | ||
public init() { } | ||
} | ||
|
||
public enum Action { | ||
case moveToHome | ||
case moveToCustomerService | ||
} | ||
|
||
public init() { } | ||
|
||
@Dependency(\.openURL) var openURL | ||
|
||
public var body: some ReducerOf<Self> { | ||
Reduce(self.core) | ||
} | ||
|
||
private func core(_ state: inout State, _ action: Action) -> EffectOf<Self> { | ||
switch action { | ||
case .moveToHome: | ||
return .none | ||
case .moveToCustomerService: | ||
guard let feedbackURL = URL(string: "https://forms.gle/wEUPH9Tvxgua4hCZ9") else { return .none } | ||
return .run { _ in await self.openURL(feedbackURL) } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.