-
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.
Merge pull request #208 from Nexters/release/1.0.3
v1.0.3 Release -> Main
- Loading branch information
Showing
40 changed files
with
1,021 additions
and
61 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import SwiftUI | ||
|
||
import FeatureGuideInterface | ||
|
||
import ComposableArchitecture | ||
|
||
@main | ||
struct AppView: App { | ||
let mainGuideStore = Store( | ||
initialState: MainGuideFeature.State(), | ||
reducer: { MainGuideFeature() }) | ||
|
||
let pingpongGuideStore = Store( | ||
initialState: PingPongGuideFeature.State(), | ||
reducer: { PingPongGuideFeature() }) | ||
|
||
let photoShareGuideStore = Store( | ||
initialState: PhotoShareGuideFeature.State(), | ||
reducer: { PhotoShareGuideFeature() }) | ||
|
||
let startGuideStore = Store( | ||
initialState: StartGuideFeature.State(), | ||
reducer: { StartGuideFeature() }) | ||
|
||
var body: some Scene { | ||
|
||
WindowGroup { | ||
// MainGuideView(store: mainGuideStore) | ||
// PingPongGuideView(store: pingpongGuideStore) | ||
// PhotoShareGuideView(store: photoShareGuideStore) | ||
StartGuideView(store: startGuideStore) | ||
} | ||
} | ||
} | ||
|
63 changes: 63 additions & 0 deletions
63
Projects/Feature/Guide/Interface/Sources/MainGuide/MainGuideFeature.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,63 @@ | ||
// | ||
// MainGuideFeature.swift | ||
// FeatureGuideInterface | ||
// | ||
// Created by 임현규 on 8/22/24. | ||
// | ||
|
||
import Foundation | ||
|
||
import ComposableArchitecture | ||
|
||
@Reducer | ||
public struct MainGuideFeature { | ||
private let reducer: Reduce<State, Action> | ||
|
||
init(reducer: Reduce<State, Action>) { | ||
self.reducer = reducer | ||
} | ||
|
||
public struct State: Equatable { | ||
public init() {} | ||
} | ||
|
||
public enum Action { | ||
|
||
// User Action | ||
case nextButtonDidTapped | ||
case backButtonDidTapped | ||
|
||
// Delegate | ||
case delegate(Delegate) | ||
|
||
public enum Delegate { | ||
case nextButtonDidTapped | ||
} | ||
} | ||
|
||
public var body: some ReducerOf<Self> { | ||
reducer | ||
} | ||
} | ||
|
||
extension MainGuideFeature { | ||
public init() { | ||
@Dependency(\.dismiss) var dismiss | ||
let reducer = Reduce<State, Action> { state, action in | ||
switch action { | ||
case .nextButtonDidTapped: | ||
return .send(.delegate(.nextButtonDidTapped)) | ||
|
||
case .backButtonDidTapped: | ||
return .run { send in | ||
await dismiss() | ||
} | ||
|
||
default: | ||
return .none | ||
} | ||
} | ||
|
||
self.init(reducer: reducer) | ||
} | ||
} |
Oops, something went wrong.