Skip to content

Commit

Permalink
fix: order embedding after start date asc
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Lilleby authored and Anton Lilleby committed Feb 3, 2025
1 parent 341f29d commit 4159311
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/lib/server/sanity/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const pastEventsQuery = groq`*[_type == "event" && start <= now()] | orde
export const externalFutureEventsQuery = groq`*[_type == "event" && start > now() && visibleForExternals] | order(start asc)`;
export const externalPastEventsQuery = groq`*[_type == "event" && start <= now() && visibleForExternals] | order(start desc)`;

export const embedExternalFutureEventsQuery = groq`*[_type == "event" && start > now() && visibleForExternals] | order(startDate asc)[0...3]`;
export const embedExternalFutureEventsQuery = groq`*[_type == "event" && start > now() && visibleForExternals] | order(start asc)[0...3]`;

export const getEventContent = async ({ document_id }: { document_id: string }) => {
return await sanityClientWithoutStega.fetch<Event>(eventQuery, { id: document_id });
Expand Down

0 comments on commit 4159311

Please sign in to comment.