From 79ae4335d437dbd5052c77067c3bfda5940a325e Mon Sep 17 00:00:00 2001 From: Guryss Date: Tue, 5 Nov 2024 17:18:28 +0900 Subject: [PATCH] =?UTF-8?q?[#111]=20=EA=B3=84=EC=A0=95=ED=83=88=ED=87=B4?= =?UTF-8?q?=20=EC=8B=9C=20=ED=83=88=ED=87=B4=EC=99=84=EB=A3=8C=EB=B7=B0=20?= =?UTF-8?q?=EB=9C=B0=20=EC=88=98=20=EC=9E=88=EB=8F=84=EB=A1=9D=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/Account/AccountView.swift | 36 ++++++++++--------- .../ViewModel/Account/AccountViewModel.swift | 1 - 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/AGAMI/Sources/Presentation/View/Account/AccountView.swift b/AGAMI/Sources/Presentation/View/Account/AccountView.swift index f3fe2148..a0907a3d 100644 --- a/AGAMI/Sources/Presentation/View/Account/AccountView.swift +++ b/AGAMI/Sources/Presentation/View/Account/AccountView.swift @@ -29,30 +29,32 @@ struct AccountView: View { LogoutButton(viewModel: viewModel) .padding(.bottom, 20) - - if viewModel.isScucessDeleteAccount { - SignOutView() - .onAppear { - DispatchQueue.main.asyncAfter(deadline: .now() + 5) { - viewModel.isScucessDeleteAccount = false - UserDefaults.standard.removeObject(forKey: "isSignedIn") - } - } - } } .padding(.horizontal, 8) + + if viewModel.isScucessDeleteAccount { + SignOutView() + .onAppear { + DispatchQueue.main.asyncAfter(deadline: .now() + 5) { + viewModel.isScucessDeleteAccount = false + UserDefaults.standard.removeObject(forKey: "isSignedIn") + } + } + } } .navigationTitle("계정") .navigationBarTitleDisplayMode(.large) .navigationBarBackButtonHidden() .toolbar { - ToolbarItem(placement: .topBarLeading) { - Button { - coordinator.pop() - } label: { - Image(systemName: "chevron.backward") - .font(.pretendard(weight: .semiBold600, size: 17)) - .foregroundStyle(Color(.pPrimary)) + if !viewModel.isScucessDeleteAccount { + ToolbarItem(placement: .topBarLeading) { + Button { + coordinator.pop() + } label: { + Image(systemName: "chevron.backward") + .font(.pretendard(weight: .semiBold600, size: 17)) + .foregroundStyle(Color(.pPrimary)) + } } } } diff --git a/AGAMI/Sources/Presentation/ViewModel/Account/AccountViewModel.swift b/AGAMI/Sources/Presentation/ViewModel/Account/AccountViewModel.swift index e1a700d2..17c770d4 100644 --- a/AGAMI/Sources/Presentation/ViewModel/Account/AccountViewModel.swift +++ b/AGAMI/Sources/Presentation/ViewModel/Account/AccountViewModel.swift @@ -53,7 +53,6 @@ final class AccountViewModel { if success { isScucessDeleteAccount = true - UserDefaults.standard.removeObject(forKey: "isSignedIn") dump("계정 삭제 성공") } else { dump("계정 삭제 실패")