Skip to content

Commit ebc53dc

Browse files
committed
Add PostView Preview
1 parent 8230c46 commit ebc53dc

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Shared/Models/Comment.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ extension Comment {
4646
id = "123"
4747
author = "sirarkimedes"
4848
score = 123556
49-
body = "The Greatest Of All Time"
49+
body = "This is a body of text that is purely to act as an example!"
5050
if nested != 0 {
5151
replies = CommentListing(data: CommentListing.CommentListingData(children: [CommentListing.CommentListingData.CommentData(data: Comment(nested: nested - 1))]))
5252
} else{

Shared/Views/PostView.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,11 @@ struct PostView: View {
4949
}
5050
}
5151
}
52+
53+
#if DEBUG
54+
struct PostView_Previews: PreviewProvider {
55+
static var previews: some View {
56+
PostView(post: Post.example)
57+
}
58+
}
59+
#endif

0 commit comments

Comments
 (0)