Post.js refactored, imports consolidated

This commit is contained in:
2022-01-29 14:06:18 -06:00
parent 669e8d3017
commit bb8de386bb
3 changed files with 18 additions and 13 deletions

View File

@@ -91,17 +91,8 @@ export default function Feed() {
let newFeed = sortedPosts.map((post) => {
return (
<Post
title={post.data.title} // each variable passed in as props
author={post.data.author}
subreddit={post.data.subreddit}
ups={post.data.ups}
comments={post.data.num_comments}
time={post.data.created_utc}
data={post.data}
key={v4()}
media={post.data.post_hint === 'image' && post.data.url}
permalink={post.data.permalink}
selftext={post.data.selftext}
video={post.data.is_video ? post.data.media.reddit_video.fallback_url : null} // to do: handle media edge cases, especially video
/>
);
})