#Problem in Promptopia.

20 messages · Page 1 of 1 (latest)

topaz pivot
#

Hey Guys. Has anyone faced a problem in promptopia in the PromptCard component where it wasn´t possible to show the image ??? If so, anyone was able to solve it ? Help please.

olive hinge
unkempt iglooBOT
#
To help us help you, when asking for help, tell us the following:
💠💠💠
  • Expectations! What did you expect your code to do? What did it actually do?
  • Errors! If your code produced an error, paste the error message for us to see!
  • Code! We can't help you if you don't show us the code that you're having trouble with. No screenshots -- use code blocks instead please (!!help.codeblocks).
  • Libraries! If you're using a library, tell us the library name.
deep sedge
olive hinge
#

In general

#

!!js.undefined

unkempt iglooBOT
#
Are you getting an error that looks like this?
💠💠💠

Uncaught TypeError: Cannot read properties of undefined (reading 'name') (or a very similar message)

This means you have tried to access a property on a value that is undefined. A value could be undefined (or null) for many reasons.

// Using a variable without declaring it:
foo.name;

// Declaring a variable, but not setting a value:
let foo;
foo.name;

// Declaring a variable, but setting it to undefined explicitly...
// or returning undefined from a function or method:
let foo = undefined;
foo.name

You'll have to find the variable on which you try to access the property, and work backwards to find out why it's undefined (or null). Errors come with stack traces right underneath. It will say the exact line and position where the error occurred.

deep sedge
#

Everything works fine now on Local machine but now having some problem on Deployment

#

I managed the deploy but on Vercel my feed is not updating after deployment

#

Only when I redeploy it my feed get updated otherwise adding new prompt or deleting existing prompt is not showing on my feed

#

On Local machine I am able to see instant feed update but not on Vercel

topaz pivot
#

Where did you use {[myPosts]} ?

deep sedge
topaz pivot
#

Thanks man

deep sedge
topaz pivot
#

Yeah, it did. Thanks bro

topaz hare
#

hey just wondering the delete prompts seems not working correctly after I hit refresh, all prompts popped back up.. I think something has to do with this line of code?

if (hasConfirmed) {
      try {
        await fetch(`/api/prompt/${post._id.toString()}`, {
          method: "DELETE",
        });