Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update cms-sanity example (#34898)
Upgrades `next-sanity` to the latest version and applies breaking changes. Improves the docs for the Sanity example. ## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint` Co-authored-by: even westvang <172952+evenwestvang@users.noreply.github.com>
- Loading branch information
1 parent
9c0c93e
commit 21c07eb
Showing
5 changed files
with
54 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters