sanity-io / next-sanity

Sanity.io toolkit for Next.js

Home Page:https://www.sanity.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting undefined when fetching data from sanity studio in latest nextjs

abdulhadi240 opened this issue · comments

This is a simple homepage where i fetch data from serversideprops . all the info here is correct .But i am still getting undefined.
e1
Here is the Screenshot of the data i should receive.
e2
This s the config file of sanity.
e3

Hi, thanks for the detailed report!

It seems to work on my end though: https://codesandbox.io/p/sandbox/nextjs-gssp-repro-lp65k8

I see you have useCdn: true, this means it may take a while for you to see new content (10 - 15 minutes). You can set it to useCdn: false during development to avoid confusion, that's what the "Vision Tool" is doing :)

I highly recommend you join our Slack to get more help as you're digging into Sanity.