Open Priyanshsharma21 opened 2 years ago
What exactly is your problem?
When and where does it happen? What files are you talking about?
I got that error also previously, specifically when rendering maylike products
(1:37:50 on video)
After I checked back, there is an asterisk (*) missing in my productsQuery
inside getStaticProps
,
inside pages > product > [slug].js
(before) export const getStaticProps = async ({ params: { slug } }) => { ... const productsQuery = '[_type == "product"]'; ... };
(after) export const getStaticProps = async ({ params: { slug } }) => { ... const productsQuery = '*[_type == "product"]'; ... };
Keep getting this error in slug.current, I spend large time on this please help with this slug.current is undefined here