Remvoe useless functions

This commit is contained in:
2023-10-29 19:31:02 +01:00
parent f451e70fdf
commit 43700ff4df

View File

@@ -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<Project>('projects')
.where({
latest: true,
})
.limit(1)
.findOne()
})
}
export function useEducations() {
return useAsyncData('content:educations', () => {
return queryContent<Education>('educations')
@@ -49,12 +38,3 @@ export function usePosts() {
})
})
}
export function useLatestPost() {
return useAsyncData('content:latestPost', async () => {
const posts = await queryContent<Post>('writing').find()
return posts.sort((a, b) => {
return new Date(b.publishedAt).getTime() - new Date(a.publishedAt).getTime()
})[0]
})
}