diff --git a/functions/handlers/post.js b/functions/handlers/post.js index 07654c4..f57dbb7 100644 --- a/functions/handlers/post.js +++ b/functions/handlers/post.js @@ -88,7 +88,7 @@ exports.getFollowedPosts = (req, res) => { .then(function(allPosts) { let posts = []; allPosts.forEach(function(doc) { - if(doc.data().userHandle === req.user.handle || doc.data().userHandle === "Admin") { + if(doc.data().userHandle === req.user.handle) { posts.push(doc.data()); } else if(followers_likedTopics.has(doc.data().userHandle)) { diff --git a/twistter-frontend/src/pages/Home.js b/twistter-frontend/src/pages/Home.js index 0bc7d42..38af793 100644 --- a/twistter-frontend/src/pages/Home.js +++ b/twistter-frontend/src/pages/Home.js @@ -7,6 +7,7 @@ import dayjs from 'dayjs'; import relativeTime from 'dayjs/plugin/relativeTime'; // Material UI and React Router +import { makeStyles, styled } from '@material-ui/core/styles'; import Grid from '@material-ui/core/Grid'; import Card from '@material-ui/core/Card'; import CardContent from '@material-ui/core/CardContent'; @@ -18,6 +19,10 @@ import logo from '../images/twistter-logo.png'; import noImage from '../images/no-img.png'; import Writing_Microblogs from '../Writing_Microblogs'; +const MyCardContent = styled(CardContent)({ + textAlign: "left" +}); + class Home extends Component { state = {}; @@ -40,7 +45,7 @@ class Home extends Component { let postMarkup = this.state.posts ? ( this.state.posts.map(post => - + { this.state.imageUrl ? () : @@ -56,7 +61,7 @@ class Home extends Component { Topics: {post.microBlogTopics}
Likes {post.likeCount}   Shares {post.commentCount} -
+
) ) : (

loading posts...

); diff --git a/twistter-frontend/src/pages/user.js b/twistter-frontend/src/pages/user.js index ce0fa45..d9256fe 100644 --- a/twistter-frontend/src/pages/user.js +++ b/twistter-frontend/src/pages/user.js @@ -29,6 +29,10 @@ const MyChip = styled(Chip)({ color: 'primary' }); +const MyCardContent = styled(CardContent)({ + textAlign: "left" +}); + class user extends Component { state = { profile: null, @@ -122,7 +126,7 @@ class user extends Component { let postMarkup = this.state.posts ? ( this.state.posts.map(post => - + { this.state.imageUrl ? () : @@ -138,7 +142,7 @@ class user extends Component { Topics: {post.microBlogTopics}
Likes {post.likeCount}   Shares {post.commentCount} -
+
) ) : (

loading posts...

);