john-smilga / nextjs-course-openai

https://johnsmilga.com/
150 stars 69 forks source link

Issue fetching SingleDrinkPage. #3

Open PhilipRoberto opened 2 months ago

PhilipRoberto commented 2 months ago

Please, can you provide some insights. I followed your code on YouTube, but I'm now stuck at SingleDrinkPage because I'm getting an error - "Unexpected end of JSON input". I also get this 'undefined' when I log the data.

I'd appreciate any help you can render. Thanks![IMG_20240801_210943_387.jpg](https://github.![IMG_20240801_083100_566.jpg](https://github.com/user-attachments/assets/19e66e7b-a910-4ce7![IMG_20240801_083125_111.jpg](https://github.com/user-attachments/assets/f721a24d-ab38-4ac0-a49a-216320ed8be7)

IMG_20240801_210838_701.jpg

ts/e0bfc0fa-b42f-447d-8a55-e15fff5f38f1)

083100_566.jpg …]()

![Uploading IMG_20240801_210929_968.jpg …]()

![Uploading IMG20240801IMG_20240801_210859_778.jpg

210838_701.jpg …]()

![Uploading IMG_20240801_210859_778.jpg …]()

simoncheam commented 1 month ago

@PhilipRoberto Compare your code with repo links below.

https://github.com/simoncheam/nextjs-tutorial/blob/main/app/drinks/page.js

https://github.com/simoncheam/nextjs-tutorial/blob/main/app/drinks/%5Bid%5D/page.js

Did you find the issue?