Skip to content

Commit d8a5e9d

Browse files
committed
update back button on nav stack
1 parent 14eec1d commit d8a5e9d

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

WooCommerce/Classes/POS/Presentation/Settings/PointOfSaleSettingsHardwareDetailView.swift

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,22 @@ struct PointOfSaleSettingsHardwareDetailView: View {
111111
.buttonStyle(.plain)
112112
}
113113
}
114-
.navigationTitle(Localization.cardReadersTitle)
114+
.navigationBarBackButtonHidden(true)
115+
.toolbar {
116+
ToolbarItem(placement: .navigationBarLeading) {
117+
Button {
118+
navigationPath.removeLast()
119+
} label: {
120+
HStack(spacing: POSSpacing.small) {
121+
Image(systemName: "chevron.left")
122+
Text(Localization.cardReadersTitle)
123+
}
124+
.font(.posBodyLargeRegular())
125+
.foregroundColor(.posOnSurface)
126+
.contentShape(Rectangle())
127+
}
128+
}
129+
}
115130
.posFullScreenCover(isPresented: $showCardReaderDocumentationModal) {
116131
SafariView(url: WooConstants.URLs.inPersonPaymentsLearnMoreWCPay.asURL())
117132
}
@@ -136,7 +151,22 @@ struct PointOfSaleSettingsHardwareDetailView: View {
136151
}
137152
.buttonStyle(.plain)
138153
}
139-
.navigationTitle(Localization.scannersTitle)
154+
.navigationBarBackButtonHidden(true)
155+
.toolbar {
156+
ToolbarItem(placement: .navigationBarLeading) {
157+
Button {
158+
navigationPath.removeLast()
159+
} label: {
160+
HStack(spacing: POSSpacing.small) {
161+
Image(systemName: "chevron.left")
162+
Text(Localization.scannersTitle)
163+
}
164+
.font(.posBodyLargeRegular())
165+
.foregroundColor(.posOnSurface)
166+
.contentShape(Rectangle())
167+
}
168+
}
169+
}
140170
}
141171

142172
}

0 commit comments

Comments
 (0)