mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2025-12-15 18:08:46 +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() {
|
||||
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 />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user