cleaning up and adding back search bar

This commit is contained in:
talksik
2021-12-23 20:50:11 -08:00
parent d0efe32076
commit e7b3c63000
@@ -18,41 +18,13 @@ struct FindFriendsView: View {
@State private var searchQuery: String = "" @State private var searchQuery: String = ""
var body: some View { var body: some View {
ZStack { // main content
WavesGlassBackgroundView() NavigationView {
// programmatic back button
ZStack(alignment: .topLeading) {
Color.clear
Button {
self.navigationStack.pop()
} label: {
Label("back", systemImage:"chevron.left")
.labelStyle(.iconOnly)
.font(.title2)
.foregroundColor(NirvanaColor.teal)
}
.padding()
}
// main content
VStack { VStack {
// header logo area Text("You must have someone in your phone contacts to add them. You can only add 10 people to your circle! 🥬")
LogoHeaderView() .font(.subheadline)
.foregroundColor(NirvanaColor.teal)
// action text .padding(.horizontal)
VStack(alignment: .leading) {
Text("Let's add some friends.")
.font(.title)
.fontWeight(.medium)
.foregroundColor(NirvanaColor.teal)
.multilineTextAlignment(.center)
Text("You must have someone in your phone contacts to add them. You can only add 10 people to your circle! 🥬")
.font(.subheadline)
.foregroundColor(NirvanaColor.teal)
}
List { List {
ForEach(searchItems, id: \.self) { key in ForEach(searchItems, id: \.self) { key in
@@ -63,6 +35,18 @@ struct FindFriendsView: View {
} }
.searchable(text: self.$searchQuery) .searchable(text: self.$searchQuery)
} }
.navigationBarItems(
leading:
Button {
self.navigationStack.pop()
} label: {
Label("back", systemImage:"chevron.left")
.labelStyle(.iconOnly)
.font(.title2)
.foregroundColor(NirvanaColor.teal)
}
)
.navigationBarTitle("Find Friends")
} }
.onAppear { .onAppear {
self.contactsVM.fetchContacts() self.contactsVM.fetchContacts()