adrianhajdin / project_next_14_ai_prompt_sharing

Next.js recently became the official React framework as outlined in React docs. In this course, you'll learn the most important Next.js concepts and how they fit into the React ecosystem. Finally, you'll put your skills to the test by building a modern full-stack Next 14 application.
https://www.jsmastery.pro/ultimate-next-course
2.9k stars 427 forks source link

TypeError: Cannot read properties of null (reading 'image') #93

Closed aipni closed 8 months ago

aipni commented 8 months ago

from console chrome dev tools " TypeError: Cannot read properties of null (reading 'image') at o (page-241b7b2b063c19b3.js:1:1965) "

from console chrome dev tools " "div", { className: "flex-1 flex justify-start items-center gap-3 cursor-pointer", onClick: f, children: [(0, r.jsx)(n(), { src: t.creator.image, alt: "user_image", width: 40, height: 40, className: "rounded-full object-contain" }),
"

webpage home after deploying to vercel " Application error: a client-side exception has occurred (see the browser console for more information). "

aipni commented 8 months ago

error-web2 error-web

aipni commented 8 months ago

Can anyone help on this issue

aipni commented 8 months ago

on my local development i got an error on this part

" <Image src={post.creator.image} alt='user_image' width={40} height={40} className='rounded-full object-contain' /> " Unhandled Runtime Error

aipni commented 8 months ago

return ( _post && post.creator &&_




);

Adding above bold code fixed the issue

giriyaram commented 4 months ago

could you please specify, where to add this code "return ( post && post.creator &&"

aipni commented 3 months ago

components/PromptCard.jsx

line number 29