Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SCRUM-110] 2차 MVP 버그 수정 #68

Merged
merged 4 commits into from
Dec 31, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 23 additions & 26 deletions Projects/Feature/Feature/Sources/AppView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,36 @@ import ComposableArchitecture

public struct AppView: View {
@Bindable var store: StoreOf<AppCore>

public init(store: StoreOf<AppCore>) {
self.store = store
}

public var body: some View {
Group {
if let splashStore = store.scope(state: \.splash, action: \.splash) {
SplashView(store: splashStore)
.zIndex(0)
} else if let onboardingStore = store.scope(state: \.onboarding, action: \.onboarding) {
NavigationStack {
OnboardingView(store: onboardingStore)
.zIndex(1)
}
} else if let homeStore = store.scope(state: \.home, action: \.home) {
NavigationStack {
HomeView(store: homeStore)
.zIndex(2)
ZStack {
Group {
if let splashStore = store.scope(state: \.splash, action: \.splash) {
SplashView(store: splashStore)
.zIndex(0)
} else if let onboardingStore = store.scope(state: \.onboarding, action: \.onboarding) {
NavigationStack {
OnboardingView(store: onboardingStore)
.zIndex(1)
}
} else if let homeStore = store.scope(state: \.home, action: \.home) {
NavigationStack {
HomeView(store: homeStore)
.transition(.opacity.animation(.easeInOut))
.zIndex(2)
}
} else {
Global.Color.black // MARK: - DB정보 없고 오프라인일때 Dialog 띄우기
.zIndex(3)
devMinseok marked this conversation as resolved.
Show resolved Hide resolved
}
} else {
Global.Color.black // MARK: - DB정보 없고 오프라인일때 Dialog 띄우기
.zIndex(3)
}
}
.transition(.opacity)
.animation(.easeInOut, value: store.home == nil)
.fullScreenCover(isPresented: $store.isLoading) {
LoadingView()
if store.isLoading {
LoadingView()
}
}
.fullScreenCover(
item: $store.scope(
Expand All @@ -64,10 +65,6 @@ public struct AppView: View {
) { store in
NetworkErrorView(store: store)
}
.transaction(value: store.isLoading) { transaction in
// TODO: 11.25 로딩 이외 다른 fullScreen들도 disabled됨
transaction.disablesAnimations = true
}
.onLoad {
store.send(.onLoad)
}
Expand Down
Loading