File tree Expand file tree Collapse file tree
web/sanity/queries/common/promotions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,16 +18,17 @@ const tagFilter = /* groq */ `
1818export const pastEventsQuery = ( withTags = true ) : string => /* groq */ `
1919 *[_type match "route_" + $lang + "*"
2020 && content->_type == "event"
21- // && (content->eventDate.date) + 'T00:00:00Z' < now()
22- && coalesce(content->startDayAndTime.dayTime, (content->eventDate.date) + 'T00:00:00Z') < now()
21+ && (content->eventDate.date) < string::split( now(),"T")[0]
22+ // && coalesce(content->startDayAndTime.dayTime, (content->eventDate.date) + 'T00:00:00Z') < now()
2323 ${ withTags ? tagFilter : '' } ]
2424 | order(coalesce(content->startDayAndTime.dayTime, (content->eventDate.date) + 'T00:00:00Z') desc)[0...50]
2525`
2626
2727export const futureEventsQuery = ( withTags = true ) : string => /* groq */ `
2828 *[_type match "route_" + $lang + "*"
2929 && content->_type == "event"
30- && coalesce(content->startDayAndTime.dayTime, (content->eventDate.date) + 'T00:00:00Z') >= now()
30+ && content-> eventDate.date >= string::split(now(),"T")[0]
31+ //&& coalesce(content->startDayAndTime.dayTime, (content->eventDate.date) + 'T00:00:00Z') >= now()
3132 ${ withTags ? tagFilter : '' }
3233 ] | order( coalesce(content->startDayAndTime.dayTime, ((content->eventDate.date) + 'T00:00:00Z')) asc)
3334`
You can’t perform that action at this time.
0 commit comments