1
Fork 0

Improve profile navigation

This commit is contained in:
redstrate 2020-06-04 19:02:22 -04:00
parent 98fefc59d8
commit 201e69cbb2

View file

@ -47,7 +47,9 @@ struct DescriptionView: View {
} }
var body: some View { var body: some View {
VStack {
WebView(webView: webView) WebView(webView: webView)
}.navigationBarTitle("Sidebar", displayMode: .inline)
} }
} }
@ -57,14 +59,12 @@ struct ProfileView: View {
@State var posts: [ParsedPostContainer] = [] @State var posts: [ParsedPostContainer] = []
var body: some View { var body: some View {
VStack {
List(posts, id: \.post.id) { post in List(posts, id: \.post.id) { post in
PostView(post: post) PostView(post: post)
} }
} .navigationBarTitle(username)
.navigationBarTitle(username + "'s Feed")
.navigationBarItems(trailing: NavigationLink(destination: DescriptionView(username: username)) { .navigationBarItems(trailing: NavigationLink(destination: DescriptionView(username: username)) {
Text("Description") Text("Sidebar")
}) })
.onAppear { .onAppear {
let url = URL(string: "https://www.pillowfort.social/" + self.username + "/json")! let url = URL(string: "https://www.pillowfort.social/" + self.username + "/json")!