mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2026-03-10 13:15:05 +00:00
Display formatted time on otherUser page
This commit is contained in:
@@ -205,6 +205,11 @@ class user extends Component {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
formatDate(dateString) {
|
||||||
|
let newDate = new Date(Date.parse(dateString));
|
||||||
|
return newDate.toDateString();
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { classes } = this.props;
|
const { classes } = this.props;
|
||||||
|
|
||||||
@@ -283,7 +288,7 @@ class user extends Component {
|
|||||||
<b>{post.userHandle}</b>
|
<b>{post.userHandle}</b>
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="body2" color={"textSecondary"}>
|
<Typography variant="body2" color={"textSecondary"}>
|
||||||
{post.createdAt}
|
{this.formatDate(post.createdAt)}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
Reference in New Issue
Block a user