Refactor: Update image paths in writings and enhance Activity component

- Changed image source paths in multiple markdown files to point to the correct 'writings' directory.
- Updated the Activity component to specify the type for fetched activity data.
This commit is contained in:
2025-04-06 19:25:14 +02:00
parent 8cfd67ba21
commit 9aa904e18a
4 changed files with 28 additions and 9 deletions

View File

@@ -3,7 +3,8 @@ import type { UseTimeAgoMessages } from '@vueuse/core'
import type { Activity } from '~~/types'
import { activityMessages, IDEs } from '~~/types'
const { data: activity, refresh } = await useAsyncData<Activity>('activity', () => $fetch('/api/activity'))
const { data: activity, refresh } = await useAsyncData<Activity>('activity', () => $fetch<Activity>('/api/activity'))
useIntervalFn(async () => await refresh(), 5000)
const codingActivity = computed(() => {
const activities = activity.value!.data.activities.filter(activity => IDEs.some(ide => ide.name === activity.name))