Skip to content

Commit

Permalink
chore: remove extra VStack from tools menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Syn-McJ committed Apr 1, 2024
1 parent dd94b28 commit cbcfad0
Showing 1 changed file with 26 additions and 28 deletions.
54 changes: 26 additions & 28 deletions DashWallet/Sources/UI/Menu/Tools/ToolsMenuViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -185,36 +185,34 @@ struct ToolsMenuContent: View {
@State private var showZenLedgerSheet: Bool = false

var body: some View {
VStack {
List(items) { item in
MenuItem(
title: item.title,
subtitle: item.subtitle,
details: item.details,
icon: item.icon,
showInfo: item.showInfo,
showChevron: item.showChevron,
isToggled: item.isToggled,
action: {
if item == items.last {
showZenLedgerSheet = true
} else {
item.action?()
}
List(items) { item in
MenuItem(
title: item.title,
subtitle: item.subtitle,
details: item.details,
icon: item.icon,
showInfo: item.showInfo,
showChevron: item.showChevron,
isToggled: item.isToggled,
action: {
if item == items.last {
showZenLedgerSheet = true
} else {
item.action?()
}
)
.listRowSeparator(.hidden)
.listRowBackground(Color.clear)
}
.listStyle(.plain)
.background(Color.clear)
.sheet(isPresented: $showZenLedgerSheet) {
if #available(iOS 16.0, *) {
ZenLedgerInfoSheet()
.presentationDetents([.height(430)])
} else {
ZenLedgerInfoSheet()
}
)
.listRowSeparator(.hidden)
.listRowBackground(Color.clear)
}
.listStyle(.plain)
.background(Color.clear)
.sheet(isPresented: $showZenLedgerSheet) {
if #available(iOS 16.0, *) {
ZenLedgerInfoSheet()
.presentationDetents([.height(430)])
} else {
ZenLedgerInfoSheet()
}
}
}
Expand Down

0 comments on commit cbcfad0

Please sign in to comment.