Content
@
0 reply
0 recast
0 reaction
Tobias
@caruso33
@frames Hi, I am trying to call an async function on a composer action submission like it is described here: https://github.com/framesjs/frames.js/blob/4714a902b589632714bcc95b3a81268eb4b6a1b7/templates/next-starter-with-examples/app/examples/composer-actions/create-game/page.tsx#L26 However, the async function doesn't get triggered somehow, also no logs are visible. Anyone knows what I am doing wrong here? <form className="flex flex-col gap-4" onSubmit={async (e) => { e.preventDefault(); const formData = new FormData(e.currentTarget); // normally you would send the request to server, do something there, etc // this is only for demonstration purposes console.log("before") await new Promise((resolve) => setTimeout(() => { console.log("timeout finished") resolve(null) }, 2000) ) console.log("after")
1 reply
0 recast
0 reaction
Stephan
@stephancill
the logs will happen in the context of the composer action iframe, so you will have to look there
1 reply
0 recast
0 reaction
Tobias
@caruso33
Aah wasn't aware of that. I ran into a cors error, that's why it initially didn't work. Thanks! 🙏🏼
0 reply
0 recast
0 reaction