mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-26 09:49:12 +00:00
fix(front): fix confirm anonymous participation
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
beef3ff16d
commit
f99267c611
1 changed files with 10 additions and 4 deletions
|
@ -67,7 +67,7 @@ import { EventJoinOptions } from "@/types/enums";
|
|||
import { IParticipant } from "../../types/participant.model";
|
||||
import RouteName from "../../router/name";
|
||||
import { CONFIRM_PARTICIPATION } from "../../graphql/event";
|
||||
import { computed, ref } from "vue";
|
||||
import { computed, ref, watchEffect } from "vue";
|
||||
import { useMutation } from "@vue/apollo-composable";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useHead } from "@vueuse/head";
|
||||
|
@ -90,9 +90,15 @@ const { onDone, onError, mutate } = useMutation<{
|
|||
confirmParticipation: IParticipant;
|
||||
}>(CONFIRM_PARTICIPATION);
|
||||
|
||||
mutate(() => ({
|
||||
token: props.token,
|
||||
}));
|
||||
const participationToken = computed(() => props.token);
|
||||
|
||||
watchEffect(() => {
|
||||
if (participationToken.value) {
|
||||
mutate({
|
||||
token: participationToken.value,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
onDone(async ({ data }) => {
|
||||
participation.value = data?.confirmParticipation;
|
||||
|
|
Loading…
Reference in a new issue