diff --git a/twistter-frontend/src/pages/user.js b/twistter-frontend/src/pages/user.js
index af0243c..b9e7247 100644
--- a/twistter-frontend/src/pages/user.js
+++ b/twistter-frontend/src/pages/user.js
@@ -17,6 +17,7 @@ import TextField from '@material-ui/core/TextField';
import Userline from '../Userline';
import noImage from '../images/no-img.png';
import Writing_Microblogs from '../Writing_Microblogs';
+import PostSkeleton from '../util/PostSkeleton';
const MyChip = styled(Chip)({
margin: 2,
@@ -107,7 +108,16 @@ class user extends Component {
) : ();
let postMarkup = this.state.posts ? (
- this.state.posts.map(post =>
{post.body}
) + this.state.posts.map(post => +
+ {imageMarkup}
+ {post.userHandle}
+ {post.createdAt}
+ {post.microBlogTitle}
+ {post.body}
+ {post.microBlogTopics}
+ Likes {post.likeCount} Comments {post.commentCount}
+
My Posts
); return ( diff --git a/twistter-frontend/src/util/PostSkeleton.js b/twistter-frontend/src/util/PostSkeleton.js index ff14e16..25cbac5 100644 --- a/twistter-frontend/src/util/PostSkeleton.js +++ b/twistter-frontend/src/util/PostSkeleton.js @@ -1,12 +1,12 @@ /* eslint-disable */ -import React, { Fragment } from 'react'; +import React, { Component } from 'react'; import NoImg from '../images/no-img.png'; import PropTypes from 'prop-types'; // MUI import Card from '@material-ui/core/Card'; import CardMedia from '@material-ui/core/CardMedia'; import CardContent from '@material-ui/core/CardContent'; - +import Typography from '@material-ui/core/Typography'; import withStyles from '@material-ui/core/styles/withStyles'; const styles = (theme) => ({ @@ -50,23 +50,20 @@ const styles = (theme) => ({ } }); -const PostSkeleton = (props) => { - const { classes } = props; - - const content = Array.from({ length: 5 }).map((item, index) => ( -