From e34d31ce9d483dc4e27754aef6abed72cdc6acb6 Mon Sep 17 00:00:00 2001 From: pedrobonamin Date: Tue, 17 Sep 2024 14:35:31 +0200 Subject: [PATCH] fix(core): update query to check expiry date --- packages/sanity/src/core/studio/studioAnnouncements/query.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sanity/src/core/studio/studioAnnouncements/query.ts b/packages/sanity/src/core/studio/studioAnnouncements/query.ts index 48c6131f5cec..66551cc0a41c 100644 --- a/packages/sanity/src/core/studio/studioAnnouncements/query.ts +++ b/packages/sanity/src/core/studio/studioAnnouncements/query.ts @@ -1,7 +1,7 @@ /** * TODO: Remove once the API call is implemented */ -export const studioAnnouncementQuery = `*[_type == "productAnnouncement"] | order(publishedDate desc) { +export const studioAnnouncementQuery = `*[_type == "productAnnouncement" && dateTime(expiryDate) > dateTime(now())] | order(publishedDate desc) { ..., body[]{ ...,