From a8f78fbe33c7f24d5f6e67a043f894a32738631b Mon Sep 17 00:00:00 2001 From: dlrjswns Date: Wed, 16 Sep 2026 14:07:27 +0900 Subject: [PATCH] =?UTF-8?q?[FEAT]=20=EB=B9=84=EC=9A=B8=20=EC=B9=B4?= =?UTF-8?q?=EB=93=9C=EA=B0=80=20=EC=97=86=EB=8A=94=20=EA=B2=BD=EC=9A=B0=20?= =?UTF-8?q?Alert=EB=9D=84=EC=9A=B0=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Archive/Detail/ArchiveDetailView.swift | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/GAMSS/Sources/Presentation/Archive/Detail/ArchiveDetailView.swift b/GAMSS/Sources/Presentation/Archive/Detail/ArchiveDetailView.swift index 292272b..37b479f 100644 --- a/GAMSS/Sources/Presentation/Archive/Detail/ArchiveDetailView.swift +++ b/GAMSS/Sources/Presentation/Archive/Detail/ArchiveDetailView.swift @@ -15,6 +15,7 @@ struct ArchiveDetailView: View { @State private var isMonthPickerPresented = false @State private var shredMode: CardShredMode? @State private var selectedNote: DropNote? + @State private var isEmptyNotesModalPresented = false private let title: String @@ -31,7 +32,11 @@ struct ArchiveDetailView: View { VStack(spacing: 0) { NavigationBarView(title: title, onBack: { dismiss() }) { Button { - shredMode = .all + if viewModel.notes.isEmpty { + isEmptyNotesModalPresented = true + } else { + shredMode = .all + } } label: { Text("비우기") .typography(.body5Medium) @@ -146,6 +151,20 @@ struct ArchiveDetailView: View { .transition(.opacity) .zIndex(1) } + + if isEmptyNotesModalPresented { + ModalContainerView(isPresented: $isEmptyNotesModalPresented) { + ModalContentView( + title: "비울 감정이 없어요", + actions: [ + .init(title: "확인", style: .primary, action: { + isEmptyNotesModalPresented = false + }) + ] + ) + } + .zIndex(2) + } } .animation(.easeOut(duration: 0.12), value: selectedNote?.id) .hidesTabBar()