diff --git a/js/src/views/Home.vue b/js/src/views/Home.vue index 31808cb7b..157f9edd8 100644 --- a/js/src/views/Home.vue +++ b/js/src/views/Home.vue @@ -80,6 +80,7 @@ @@ -99,6 +100,7 @@ v-for="participation in lastWeekEvents" :key="participation.id" :participation="participation" + @eventDeleted="eventDeleted" :options="{ hideDate: false }" /> @@ -163,6 +165,7 @@ import Subtitle from "../components/Utils/Subtitle.vue"; config: CONFIG, currentUserParticipations: { query: LOGGED_USER_PARTICIPATIONS, + fetchPolicy: "network-only", variables() { const lastWeek = new Date(); lastWeek.setDate(new Date().getDate() - 7); @@ -356,6 +359,12 @@ export default class Home extends Vue { ); } + eventDeleted(eventid: string) { + this.currentUserParticipations = this.currentUserParticipations.filter( + (participation) => participation.event.id !== eventid + ); + } + // getAddressData(addressData) { // const geoHash = ngeohash.encode( // addressData.latitude,