mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
36 lines
635 B
Vue
36 lines
635 B
Vue
<template>
|
|
<div>
|
|
<notification
|
|
v-for="notification in notifications"
|
|
:key="notification.id"
|
|
:notification="notification"
|
|
@read="markAsRead(42)"
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import Notification from './Notification'
|
|
import { mapGetters, mapActions } from 'vuex'
|
|
|
|
export default {
|
|
name: 'NotificationList',
|
|
components: {
|
|
Notification
|
|
},
|
|
computed: {
|
|
...mapGetters({
|
|
currentUser: 'auth/user'
|
|
}),
|
|
notifications() {
|
|
return this.currentUser.notifications
|
|
}
|
|
},
|
|
methods: {
|
|
...mapActions({
|
|
markAsRead: 'notifications/markAsRead'
|
|
})
|
|
}
|
|
}
|
|
</script>
|