[#660] Settings button is not part of a navigation bar (#662)

This deletes the HStack on the HomeView and adds the settings view into
the navigation bar trailing item
This commit is contained in:
Francisco Gindre 2023-03-14 05:42:34 -03:00 committed by GitHub
parent c8037f714b
commit fe09ae7aef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 7 deletions

View File

@ -7,12 +7,6 @@ struct HomeView: View {
var body: some View {
WithViewStore(store) { viewStore in
VStack {
HStack {
Spacer()
settingsButton(viewStore)
}
balance(viewStore)
Spacer()
@ -30,6 +24,7 @@ struct HomeView: View {
}
.applyScreenBackground()
.navigationTitle(L10n.Home.title)
.navigationBarItems(trailing: settingsButton(viewStore))
.navigationBarTitleDisplayMode(.inline)
.onAppear(perform: { viewStore.send(.onAppear) })
.onDisappear(perform: { viewStore.send(.onDisappear) })
@ -125,7 +120,7 @@ extension HomeView {
struct HomeView_Previews: PreviewProvider {
static var previews: some View {
NavigationView {
HomeView(store: .error)
HomeView(store: .placeholder)
}
}
}