mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2025-12-18 11:08:47 +00:00
Display formatted time on otherUser page
This commit is contained in:
parent
bb50e0fa5d
commit
c85eeccd4c
@ -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 />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user