feat:#4 updated for custom ical links

This commit is contained in:
Elmar Kresse
2024-05-20 13:41:37 +02:00
parent 1f1d5300e2
commit 5641484b93
3 changed files with 44 additions and 7 deletions

View File

@@ -18,16 +18,22 @@ import { fetchICalendarEvents } from "@/api/loadICal.ts";
const { t } = useI18n({ useScope: "global" });
const props = defineProps({
token: {
type: String,
required: true,
},
});
const selectedToken = computed(() => props.token);
const mobilePage = inject("mobilePage") as Ref<boolean>;
const date: Ref<Date> = ref(new Date());
tokenStore().setToken("3rz8vb3974tr2b")
const { data: calendar } = useQuery({
queryKey: ["userCalendar", tokenStore().token],
queryKey: ["userCalendar", selectedToken],
queryFn: () =>
fetchICalendarEvents(),
fetchICalendarEvents(selectedToken.value),
select: (data) => {
return data;
},