Skip to content

Commit

Permalink
fix: render dates correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
jkklapp committed Jun 1, 2022
1 parent 2b04784 commit 5bf63b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/Dashboard/Posts.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const POSTS_RESPONSE_FIXTURE = [
{
id: '1',
message: 'Hello World',
date: new Date().getTime() / 1000,
date: new Date().getTime(),
},
];

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Dashboard/Posts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export default {
}),
},
methods: {
date(seconds) {
return moment.unix(seconds).fromNow();
date(date) {
return moment(date).fromNow();
},
fetchPosts() {
this.$store.dispatch('fetchPosts', this.$store.state);
Expand Down

0 comments on commit 5bf63b0

Please sign in to comment.