From ceb18a907cdfdb0f7a8083f56b121049f874f128 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Mon, 12 Dec 2022 21:43:24 +0100 Subject: [PATCH] Integrated the DismissableView component into the ProfileView view for the Profile module. --- .../Sources/Profile/UI/Views/ProfileView.swift | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/Modules/Sources/Profile/UI/Views/ProfileView.swift b/Modules/Sources/Profile/UI/Views/ProfileView.swift index 5b7ef6b..1536a35 100644 --- a/Modules/Sources/Profile/UI/Views/ProfileView.swift +++ b/Modules/Sources/Profile/UI/Views/ProfileView.swift @@ -36,7 +36,7 @@ public struct ProfileView: View { // MARK: Body public var body: some View { - ZStack { + DismissableView { ClearBackgroundList { Section { Image.photo @@ -99,21 +99,6 @@ public struct ProfileView: View { .listRowBackground(Color.clear) } .background(Color.red) - - VStack { - Button { - dismiss() - } label: { - Image.close - .resizable() - .frame(width: 32, height: 32) - .foregroundColor(.secondary) - } - - Spacer() - } - .frame(maxWidth: .infinity, alignment: .trailing) - .padding([.top, .trailing], 24) } } @@ -122,7 +107,6 @@ public struct ProfileView: View { // MARK: - Images+Constants private extension Image { - static let close = Image(systemName: "xmark.circle.fill") static let photo = Image(systemName: "person.crop.circle.fill") }