Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate sanity and try to fix preview issue #202

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kristofferlarberg
Copy link
Contributor

@kristofferlarberg kristofferlarberg commented Feb 1, 2023

Description

The preview functionality is currently set up in a way that builds and deploys (unpublished) draft pages that has previously been published. This pr attempts to fix this by updating package versions and refactoring code structure.

Status

Sanity has been updated to v3 according to this guide, but it seems the guide hasn't been followed from this section and onward. Also, currently npm run dev script is not working, possibly due to some remaining packages not mentioned in the guide are dependent on uninstalled @sanity/core.

next-sanity has been updated to v2 and migration according to this guide has been made. Due to the missing steps in migrating Sanity it is difficult to say if the next-sanity related refactoring is satisfactory. There are also more refactoring needed throughout the site in order for this to be fully completed. One big change is that createPreviewSubscriptionHook is replaced with definePreview.

With that said, it's difficult to say if this will solve the problem at hand. But still these changed are needed.

References

@vercel
Copy link

vercel bot commented Feb 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
iteam-next-site ❌ Failed (Inspect) Feb 1, 2023 at 11:07AM (UTC)
iteam-next-site-cms ❌ Failed (Inspect) Feb 1, 2023 at 11:07AM (UTC)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant