Skip to content

Commit

Permalink
limit fetching for Reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
milewskibogumil committed Dec 12, 2024
1 parent 3ea40dc commit 7e3d18a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/astro/src/components/global/Reviews.astro
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const Reviews_Query = `
reviews[] -> {
${Review_Query}
},
*[_type == "Review_Collection"][] | order(_updatedAt desc) {
*[_type == "Review_Collection"][0...8] | order(_updatedAt desc) {
${Review_Query}
}
),
Expand Down
2 changes: 1 addition & 1 deletion apps/sanity/schema/components/Reviews.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default defineField({
title: 'Reviews (optional)',
description: (
<>
If you will not add any reviews there, then all reviews from the <a href="/structure/Review_Collection" target='_blank' rel='noopener'>Review Collection</a> will be displayed.
If this field is left empty, 8 most recently updated reviews from the <a href="/structure/Review_Collection" target='_blank' rel='noopener'>Review Collection</a> will be displayed automatically.
</>
),
of: [
Expand Down

0 comments on commit 7e3d18a

Please sign in to comment.