Skip to content

Commit

Permalink
fix server-only query issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchuman committed Feb 21, 2025
1 parent 41dee69 commit 96b3fab
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/sanity/presentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import { defineLocations, presentationTool } from 'sanity/presentation'
import { groq } from 'next-sanity'
import { SLUG_QUERY } from './lib/queries'

export const presentation = presentationTool({
name: 'editor',
Expand All @@ -22,7 +21,7 @@ export const presentation = presentationTool({
route: '/:slug',
filter: groq`
_type == 'page' &&
${SLUG_QUERY} == $slug
array::join([...parent[]->metadata.slug.current, metadata.slug.current], '/') == $slug
`,
},
{
Expand Down

0 comments on commit 96b3fab

Please sign in to comment.