Display formatted time on otherUser page

This commit is contained in:
Clayton Wilson 2019-12-05 21:16:46 -05:00
parent bb50e0fa5d
commit c85eeccd4c

View File

@ -205,6 +205,11 @@ class user extends Component {
});
}
formatDate(dateString) {
let newDate = new Date(Date.parse(dateString));
return newDate.toDateString();
}
render() {
const { classes } = this.props;
@ -283,7 +288,7 @@ class user extends Component {
<b>{post.userHandle}</b>
</Typography>
<Typography variant="body2" color={"textSecondary"}>
{post.createdAt}
{this.formatDate(post.createdAt)}
</Typography>
<br />