Introduce segments for blog posts and filter them
This commit is contained in:
@ -52,6 +52,7 @@ export async function getBlogListing(paginationQuery: PaginationQuery) {
|
||||
}
|
||||
})
|
||||
)
|
||||
console.log(paginationQuery);
|
||||
const filteredContents = pipe(
|
||||
sortBy<ArticleContent>(prop('date')),
|
||||
(items) => reverse(items),
|
||||
|
@ -34,6 +34,7 @@ export function filterAndCount<Item extends Record<string, any>>({
|
||||
...dropTakeParams
|
||||
}: PaginationQuery) {
|
||||
return function (items: Item[]) {
|
||||
console.log(filters);
|
||||
const filterFunction = filters
|
||||
? filterByPropContains<Item>(filters)
|
||||
: identity
|
||||
|
Reference in New Issue
Block a user