From 43700ff4dfda1c8af83a043f2d74bdf45f564713 Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Sun, 29 Oct 2023 19:31:02 +0100 Subject: [PATCH] Remvoe useless functions --- src/composables/useContent.ts | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/composables/useContent.ts b/src/composables/useContent.ts index 17f2d7c..0281dd7 100644 --- a/src/composables/useContent.ts +++ b/src/composables/useContent.ts @@ -1,4 +1,4 @@ -import type { Education, JsonParsedContent, Post, Project, Skill, WorkExperience } from '../../types' +import type { Education, JsonParsedContent, Post, Project, Skill, WorkExperience } from '~~/types' export function useProjects() { return useAsyncData('content:projects', () => { @@ -6,17 +6,6 @@ export function useProjects() { }) } -export function useLatestProject() { - return useAsyncData('content:latestProject', () => { - return queryContent('projects') - .where({ - latest: true, - }) - .limit(1) - .findOne() - }) -} - export function useEducations() { return useAsyncData('content:educations', () => { return queryContent('educations') @@ -49,12 +38,3 @@ export function usePosts() { }) }) } - -export function useLatestPost() { - return useAsyncData('content:latestPost', async () => { - const posts = await queryContent('writing').find() - return posts.sort((a, b) => { - return new Date(b.publishedAt).getTime() - new Date(a.publishedAt).getTime() - })[0] - }) -}