Skip to content

Commit

Permalink
fix: upgrade to next-sanity v8
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Feb 12, 2024
1 parent 3efadcc commit 6b00c2c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
3 changes: 1 addition & 2 deletions app/studio/[[...index]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import Studio from './Studio'

export const dynamic = 'force-static'

export { metadata } from 'next-sanity/studio/metadata'
export { viewport } from 'next-sanity/studio/viewport'
export { metadata, viewport } from 'next-sanity/studio'

export default function StudioPage() {
return <Studio />
Expand Down
6 changes: 4 additions & 2 deletions lib/sanity.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ export function getClient(preview?: { token: string }): SanityClient {
apiVersion,
useCdn,
perspective: 'published',
encodeSourceMap: preview?.token ? true : false,
studioUrl,
stega: {
enabled: preview?.token ? true : false,
studioUrl,
},
})
if (preview) {
if (!preview.token) {
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"date-fns": "2.30.0",
"intl-segmenter-polyfill": "0.4.4",
"next": "14.1.0",
"next-sanity": "7.1.4",
"next-sanity": "8.0.0",
"next-sanity-image": "6.1.1",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand Down

0 comments on commit 6b00c2c

Please sign in to comment.