Rendering duplicate data in a notification list whenever notification button taped in VUE JS (Quasar framework)
-
<q-list
bordered
style=“background: white”
v-for="(item, id) in notifications"
:key=“id”>export default{
computed:
{
notifications: {
get() {
return this.$store.state.notification.notifications;
},
set(value) {
this.$store.commit(“notification/setValue”, {
key: “notifications”,
value: value
});
}
}
},
async created() {
let that = this;
var notification_snap1 = await
this.$db.collection(“notifications”).where(“receiver”,"==",this.$q.localStorage.getItem(“user_id”))
.orderBy(“time”, “desc”).get();
notification_snap1.docs.forEach(doc => {
that.notifications.push({ …doc.data(), id: doc.id });
});
}
} -
Um, what?
Scott
-
@s-molinari can you help me ?
-
@hamzaali4942 maybe you could developp and use code tag, it is unreadable. I don’t think anybody won’t make efforts if neither you…
-
@hamzaali4942 - No. Because your question isn’t one and thus, I have no idea what the issue is or what to answer.