Skip to content

Commit

Permalink
Merge pull request #3 from stefanbutura/25086-idra-news-events-split
Browse files Browse the repository at this point in the history
refs #25086 - remove news date filter. Add sorting for events view
  • Loading branch information
razvanMiu authored Jun 4, 2024
2 parents b98b723 + 6f91942 commit 726aafc
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 726aafc

Please sign in to comment.