Docs: Adjust Next.js snippets to include draftmode#33968
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA documentation snippet for Next.js headers mocking is updated to include draftMode alongside existing cookies and headers functionality, with corresponding mock setup and test assertions added across multiple code variants (CSF 3, TypeScript, and JavaScript versions). Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
valentinpalkovic
left a comment
There was a problem hiding this comment.
LGTM! @jonniebigodes Can you also please take a look?
jonniebigodes
left a comment
There was a problem hiding this comment.
@createhb21 appreciate you taking the time to put together this pull request and help us improve the documentation 🙏 ! I've checked, and all is good on my end.
Will gladly merge this once the checklist clears.
Have a great day
Stay safe
What I changed
draftModeusage todocs/_snippets/nextjs-headers-mock.mdfor all snippet variants (CSF 3/Next, JS/TS).draftMode.mockReturnValue(...).cookies().get('timezone')->headers().get('timezone')).Why
Closes #28851
Verification
yarn prettier --check docs/_snippets/nextjs-headers-mock.mdSummary by CodeRabbit
Documentation
Tests