Browse Source

fix new inscription refresh

tripeur 4 years ago
parent
commit
0fcd42ace2
1 changed files with 5 additions and 3 deletions
  1. 5 3
      src/Inscription.vue

+ 5 - 3
src/Inscription.vue

@@ -17,9 +17,7 @@
     <div v-if="status == 'Completed'">
       <h2>Inscription Validée</h2>
       <p>Votre incription à bien été validée</p>
-      <button class="btn small primary" onClick="location.href=location.href">
-        Nouvelle Inscription
-      </button>
+      <button class="btn small primary" @click="refresh">Nouvelle Inscription</button>
     </div>
   </div>
   <c-footer />
@@ -65,6 +63,10 @@ export default defineComponent({
     addBenevoles(data: Array<BenevoleJSON>) {
       this.registration.push(...data.map((o) => Benevole.fromJSON(o)));
     },
+    refresh() {
+      // eslint-disable-next-line no-self-assign
+      location.href = location.href;
+    },
   },
   mounted() {
     // Get event data