aboutsummaryrefslogtreecommitdiff
path: root/src/components/notifications/notifications.js
blob: 10f987a87a6a87b4aef598e08585546ff6c8ca41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { sortBy, take } from 'lodash'

const Notifications = {
  data () {
    return {
      visibleNotificationCount: 20
    }
  },
  computed: {
    visibleNotifications () {
      return take(sortBy(this.$store.state.statuses.notifications, ({action}) => -action.id), this.visibleNotificationCount)
    }
  }
}

export default Notifications