pleroma-fe/src/components/quotes_timeline/quotes_timeline.js
2026-08-10 22:26:22 +03:00

38 lines
869 B
JavaScript

import Timeline from 'src/components/timeline/timeline.vue'
import { useStatusesStore } from 'src/stores/statuses.js'
const QuotesTimeline = {
created() {
useStatusesStore().clearTimeline({ timeline: 'tag' })
this.$store.dispatch('startFetchingTimeline', {
timeline: 'quotes',
statusId: this.statusId,
})
},
components: {
Timeline,
},
computed: {
statusId() {
return this.$route.params.id
},
timeline() {
return this.$store.state.statuses.timelines.quotes
},
},
watch: {
statusId() {
useStatusesStore().clearTimeline({ timeline: 'tag' })
this.$store.dispatch('startFetchingTimeline', {
timeline: 'quotes',
statusId: this.statusId,
})
},
},
unmounted() {
this.$store.dispatch('stopFetchingTimeline', 'quotes')
},
}
export default QuotesTimeline