akkoma-fe/src/components/tag_timeline/tag_timeline.js

27 lines
690 B
JavaScript
Raw Normal View History

2017-09-17 11:26:35 +00:00
import Timeline from '../timeline/timeline.vue'
const TagTimeline = {
created () {
this.$store.commit('clearTimeline', { timeline: 'tag' })
2019-04-04 16:03:56 +00:00
this.$store.dispatch('startFetchingTimeline', { timeline: 'tag', tag: this.tag })
2017-09-17 11:26:35 +00:00
},
components: {
Timeline
},
computed: {
tag () { return this.$route.params.tag },
timeline () { return this.$store.state.statuses.timelines.tag }
},
watch: {
tag () {
this.$store.commit('clearTimeline', { timeline: 'tag' })
2019-04-04 16:03:56 +00:00
this.$store.dispatch('startFetchingTimeline', { timeline: 'tag', tag: this.tag })
2017-09-17 11:26:35 +00:00
}
},
destroyed () {
this.$store.dispatch('stopFetching', 'tag')
}
}
export default TagTimeline