mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-01-15 17:34:37 +00:00
20 lines
473 B
JavaScript
20 lines
473 B
JavaScript
import { mapGetters, mapActions } from 'vuex'
|
|
|
|
export default {
|
|
computed: {
|
|
...mapGetters({
|
|
maxPinnedPosts: 'pinnedPosts/maxPinnedPosts',
|
|
currentlyPinnedPosts: 'pinnedPosts/currentlyPinnedPosts',
|
|
isAdmin: 'auth/isAdmin',
|
|
}),
|
|
},
|
|
methods: {
|
|
...mapActions({
|
|
fetchPinnedPostsCount: 'pinnedPosts/fetch',
|
|
}),
|
|
},
|
|
async created() {
|
|
/* if (this.isAdmin && this.maxPinnedPosts === 0) */ await this.fetchPinnedPostsCount()
|
|
},
|
|
}
|