Skip to content

Commit

Permalink
refs #25086 - remove news date filter. Add sorting for events view
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanbutura committed Jun 4, 2024
1 parent b98b723 commit 6f91942
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/next-drupal/src/hooks/useSearchApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ export const useSearchApp = (
if (sort?.date?.field) {
djap.addSort(sort.date.field)
}
djap.addFilter('field_date', todayDate, '<=')
}
// NEWS UPCOMING SORT
if (searchIndex === 'news_upcoming') {
Expand All @@ -127,6 +126,13 @@ export const useSearchApp = (
djap.addFilter('field_date', todayDate, '>')
}

// EVENTS SORT
if (searchIndex === 'events') {
if (sort?.date?.field) {
djap.addSort(sort.date.field)
}
}

// MEETINGS
if (searchIndex === 'meetings') {
//SORT
Expand Down

0 comments on commit 6f91942

Please sign in to comment.