data fetching
This commit is contained in:
@@ -24,6 +24,18 @@ export const PROJECT_QUERY = await payload.find({
|
||||
order: true,
|
||||
categories: true,
|
||||
featuredProject: true,
|
||||
},
|
||||
},
|
||||
sort: '-order'
|
||||
})
|
||||
})
|
||||
|
||||
export const SINGLE_PROJECT_QUERY = async (slug: string) => {
|
||||
return await payload.find({
|
||||
collection: 'projects',
|
||||
where: {
|
||||
slug: {
|
||||
equals: slug
|
||||
}
|
||||
},
|
||||
limit: 1
|
||||
}
|
||||
)}
|
||||
Reference in New Issue
Block a user