import { readItems } from '@directus/sdk'; export const useSolutionList = () => { const { $directus } = useNuxtApp(); const { getDirectusLocale } = useLocalizations(); const locale = getDirectusLocale(); return useAsyncData(`solution-list-${locale}`, async () => { return await $directus.request( readItems('solutions', { fields: [ 'id', 'cover', { type: ['id', { translations: ['id', 'name'] }, 'sort'], }, { translations: ['id', 'title', 'summary'], }, ], deep: { type: { translations: { _filter: { languages_code: { _eq: locale }, }, }, }, translations: { _filter: { languages_code: { _eq: locale }, }, }, }, }) ); }); };