project type and added query file

This commit is contained in:
2025-10-20 12:16:56 -04:00
parent 4255c10944
commit 34ba94e2cb
14 changed files with 12215 additions and 106 deletions

29
utilities/queries.ts Normal file
View File

@@ -0,0 +1,29 @@
import payloadConfig from "@/src/payload.config"
import { getPayload } from "payload"
const payload = await getPayload({ config: payloadConfig })
export const HOMEPAGE_QUERY = await payload.find({
collection: 'pages',
where: {
title: {
equals: 'Home'
}
}
})
export const PROJECT_QUERY = await payload.find({
collection: 'projects',
select: {
title: true,
slug: true,
featuredImage: true,
description: true,
link: true,
github: true,
order: true,
categories: true,
featuredProject: true,
},
sort: '-order'
})