Skip to content

Commit

Permalink
docs: replace @sanity/block-content-to-react with `@portabletext/re…
Browse files Browse the repository at this point in the history
…act`
  • Loading branch information
stipsan committed Feb 28, 2022
1 parent 8af76f5 commit befa14d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/cms-sanity/README.md
Expand Up @@ -102,7 +102,7 @@ SANITY_PREVIEW_SECRET=...
//...
+ {
+ "implements": "part:@sanity/production-preview/resolve-production-url",
+ "path": "./resolveProductionUrl.js" <-- point to the path of the resolveProductionUrl.js you created in step 2
+ "path": "./resolveProductionUrl.js"
+ }
]
}
Expand Down
6 changes: 3 additions & 3 deletions examples/cms-sanity/components/post-body.js
@@ -1,10 +1,10 @@
import markdownStyles from './markdown-styles.module.css'
import BlockContent from '@sanity/block-content-to-react'
import { PortableText } from '@portabletext/react'

export default function PostBody({ content }) {
return (
<div className="max-w-2xl mx-auto">
<BlockContent blocks={content} className={markdownStyles.markdown} />
<div className={`max-w-2xl mx-auto ${markdownStyles.markdown}`}>
<PortableText value={content} />
</div>
)
}
2 changes: 1 addition & 1 deletion examples/cms-sanity/package.json
Expand Up @@ -6,7 +6,7 @@
"start": "next start"
},
"dependencies": {
"@sanity/block-content-to-react": "2.0.7",
"@portabletext/react": "^1.0.3",
"@sanity/image-url": "^1.0.1",
"classnames": "2.3.1",
"date-fns": "2.28.0",
Expand Down

0 comments on commit befa14d

Please sign in to comment.