diff --git a/MobileFort/MobileFort/Common.swift b/MobileFort/MobileFort/Common.swift index 5ab2393..ac42a73 100644 --- a/MobileFort/MobileFort/Common.swift +++ b/MobileFort/MobileFort/Common.swift @@ -43,3 +43,24 @@ struct Post: Decodable, Identifiable { } } } + +let testMedia = Media(id: 0, + url: "https://homepages.cae.wisc.edu/~ece533/images/airplane.png") + +let fooPost = Post(id: 0, + title: "Foo", + content: "", + postType: .picture, + media: [testMedia], + username: "foobar", + originalUsername: nil, + originalPost: nil) + +let fooPostReblog = Post(id: 1, + title: nil, + content: "", + postType: .picture, + media: [testMedia], + username: "foobar", + originalUsername: "foobar2", + originalPost: nil) diff --git a/MobileFort/MobileFort/PostView.swift b/MobileFort/MobileFort/PostView.swift index 86f7200..dd2fff6 100644 --- a/MobileFort/MobileFort/PostView.swift +++ b/MobileFort/MobileFort/PostView.swift @@ -38,7 +38,6 @@ struct PostView: View { struct PostView_Previews: PreviewProvider { static var previews: some View { - //PostView() - Text("Hello, world!") + return PostView(post: fooPost) } } diff --git a/MobileFort/MobileFort/ProfileView.swift b/MobileFort/MobileFort/ProfileView.swift index 0d48ce8..b6c5381 100644 --- a/MobileFort/MobileFort/ProfileView.swift +++ b/MobileFort/MobileFort/ProfileView.swift @@ -39,7 +39,6 @@ struct ProfileView: View { struct ProfileView_Previews: PreviewProvider { static var previews: some View { - //ProfileView() - Text("Hello, world!") + return ProfileView(username: "foobar", posts: [fooPost, fooPostReblog]) } }