mobilizon.chapril.org-mobil.../js/src/components/Participation/ParticipationWithAccount.vue
Thomas Citharel ee20e03cc2
Migrate to Vue 3 and Vite
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-08-11 16:46:31 +02:00

37 lines
881 B
Vue

<template>
<redirect-with-account
v-if="uri"
:uri="uri"
:pathAfterLogin="`/events/${uuid}`"
:sentence="sentence"
/>
</template>
<script lang="ts" setup>
import RedirectWithAccount from "@/components/Utils/RedirectWithAccount.vue";
import { useFetchEvent } from "@/composition/apollo/event";
import { useHead } from "@vueuse/head";
import { computed } from "vue";
import { useI18n } from "vue-i18n";
const props = defineProps<{
uuid: string;
}>();
const { event } = useFetchEvent(props.uuid);
const { t } = useI18n({ useScope: "global" });
useHead({
title: computed(() => t("Participation with account")),
meta: [{ name: "robots", content: "noindex" }],
});
const uri = computed((): string | undefined => {
return event.value?.url;
});
const sentence = t(
"We will redirect you to your instance in order to interact with this event"
);
</script>