Skip to content

Commit

Permalink
✨[feat]: 둘러보기 기능추가 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Roy-wonji committed Dec 10, 2023
1 parent 13a7a6f commit da9e9ce
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 25 deletions.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,28 @@ public struct CoreView: View {
.backgroundColor(.basicBlackDimmed)
}

.popup(isPresented: $viewModel.isLoginExplore, view: {
isExPlorePOPUP(
image: .mainHomeLogo,
title: "로그인 하세요!",
subTitle: "로그인을 하시면 더 많을걸 사용하실수 있어요!",
confirmAction: {
viewModel.isExploreApp = false
},
cancelAction: {
viewModel.isLoginExplore = false
},
noImage: false, noImageButton: false)
}, customize: { popup in
popup
.type(.default)
.position(.bottom)
.animation(.easeIn)
.closeOnTap(true)
.closeOnTapOutside(true)
.backgroundColor(.basicBlackDimmed)
})

}
.navigationBarBackButtonHidden()
.navigationDestination(for: CoreViewState.self) { state in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,6 @@ public struct HomeView: View {

}

.popup(isPresented: $viewModel.isLoginExplore, view: {
isExPlorePOPUP(
image: .mainHomeLogo,
title: "로그인 하세요!",
subTitle: "로그인을 하시면 더 많을걸 사용하실수 있어요!",
confirmAction: {
viewModel.isExploreApp = false
},
cancelAction: {
viewModel.isLoginExplore = false
},
noImage: false, noImageButton: false)
}, customize: { popup in
popup
.type(.default)
.position(.bottom)
.animation(.easeIn)
.closeOnTap(true)
.closeOnTapOutside(true)
.backgroundColor(.basicBlackDimmed)
})

.onAppear {
if !homeViewModel.isOn.isEmpty {
homeViewModel.randomQuoteRequest(userID: "\(authViewModel.userid)") {
Expand Down Expand Up @@ -208,7 +186,11 @@ public struct HomeView: View {
}
}
.onTapGesture {
appState.goToBackingView = true
if viewModel.isLoginCheck {
appState.goToBackingView = true
} else {
viewModel.isLoginExplore = true
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public struct OnBoardingLoginView: View {
commonViewViewModel.isLoginCheck = true
authViewModel.userid = model.data?.id ?? .zero
authViewModel.userNickName = model.data?.nickname ?? ""
commonViewViewModel.isExploreApp = false
commonViewViewModel.isLoginExplore = false
}, failLoginCompletion: {
appState.signUPFaillPOPUP.toggle()
presentationMode.wrappedValue.dismiss()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public struct OnBoardingView: View {
return
}
authViewModel.appleLogin(credential: credential)
commonViewViewModel.isExploreApp = false
commonViewViewModel.isLoginExplore = false
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
commonViewViewModel.viewPath.append(ViewState.isStartServiceAgreement)
}
Expand Down

0 comments on commit da9e9ce

Please sign in to comment.