akkoma-fe/src/components/mentions/mentions.js
Roger Braun cc00eb898f Switch from moment.js to vue-timeago.
Much smaller filesize for vendor.js, although we'll have to see if all
the intervals are ok.
2016-11-28 17:37:47 +01:00

28 lines
554 B
JavaScript

import Status from '../status/status.vue'
// Temporary
import { prepareStatus } from '../../modules/statuses.js'
import { map } from 'lodash'
const Mentions = {
data () {
return {
mentions: []
}
},
computed: {
username () {
return this.$route.params.username
}
},
components: {
Status
},
created () {
this.$store.state.api.backendInteractor.fetchMentions({username: this.username})
.then((mentions) => {
this.mentions = map(mentions, prepareStatus)
})
}
}
export default Mentions