This commit is contained in:
CoGomu
2025-05-24 20:43:35 +02:00
parent 1f73bb47bf
commit 98be543b01

View File

@@ -7,7 +7,6 @@ import Sidebar from '~/components/ui/Sidebar.vue';
import { Event, type SerializableEvent } from '~/utils/event';
const todos = ["Staistics", "Computer Graphics", "Webdev"]
//const { data: todo } = useFetch<string[]>('http://localhost:8080/todos')
const date = ref<DateTime>(DateTime.now())
const events = ref<Event[]>([])
@@ -20,11 +19,9 @@ onMounted(() => {
events.value = eventsResponse.value?.map(Event.fromSerializable) ?? []
})
const { data: tasks } = await useAsyncData<string[]>(
'tasks',
() => {
//return new Promise((res) => res([]))
return axios.get("/tasks").then(result => {
console.log(result.data)
return result.data
@@ -37,11 +34,6 @@ async function postEvent(event: Event) {
await axios.post('/event', event.toSerializable())
}
function myUseAsyncData<T>(name: string, callback: () => Promise<T>): { data: T, refresh: () => void, error: any } {
throw 'Not implemented'
}
</script>
<template>