import type { Skill } from '~/types/skill' export interface SkillProject { id: number slug: string title: string short_description: string image: string date_completed: string | null level_before: number level_after: number level_description: string | null } interface SkillProjectsResponse { data: { skill: Pick projects: SkillProject[] } meta: { lang: string } } export function useFetchSkillProjects(slug: Ref) { const config = useRuntimeConfig() const { locale } = useI18n() return useFetch( () => slug.value ? `/skills/${slug.value}/projects` : '', { baseURL: config.public.apiUrl as string, headers: { 'X-API-Key': config.public.apiKey as string, 'Accept-Language': locale.value, }, immediate: false, watch: false, }, ) }