Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix example #542

Merged
merged 2 commits into from
Jun 5, 2023
Merged

🐛 Fix example #542

merged 2 commits into from
Jun 5, 2023

Conversation

dciccale
Copy link
Contributor

@dciccale dciccale commented Jun 2, 2023

open, close and toggle are apparently exported from @typebot.io/js package or at least that's what worked for me, I was getting unknown function error when trying to import them from @typebot/react

aslo in order for Typebot.showPreviewMessage() and Typebot.hidePreviewMessage() to work, I need to import all exports as Typebot, otherwise it didn't seem to have the named exports "showPreviewMessage" nor "hidePreviewMessage", since I was also getting an error when trying to import them.

this is my first PR here, I apologise for mistakes upfront.

It's ok if it is not meged, I just wanted to catch your attention on this potential update required in the documentation of react embed

@vercel
Copy link

vercel bot commented Jun 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2023 6:18am

@vercel
Copy link

vercel bot commented Jun 2, 2023

@dciccale is attempting to deploy a commit to the Typebot Team on Vercel.

A member of the Team first needs to authorize it.

@baptisteArno
Copy link
Owner

Thank you very much for this 🙏

since I was also getting an error when trying to import them.

Can you tell me what error was that?

@baptisteArno
Copy link
Owner

I've reverted to import { showPreviewMessage } from '@typebot.io/js' and import { hidePreviewMessage } from '@typebot.io/js' because it should work!

@baptisteArno
Copy link
Owner

That'd be great if you can create an issue for showPreviewMessage and hidePreviewMessage because I can't reproduce 🙏

@baptisteArno baptisteArno merged commit 61fd44f into baptisteArno:main Jun 5, 2023
@dciccale
Copy link
Contributor Author

dciccale commented Jun 5, 2023

you are correct, I was able to import {showPreviewMessage} and {hidePreviewMessage} I probably overlooked what was happening, sorry

@dciccale dciccale deleted the patch-2 branch June 5, 2023 18:47
jmgoncalves97 pushed a commit to jmgoncalves97/typebot.io that referenced this pull request Jan 19, 2025
open, close and toggle are apparently exported from @typebot.io/js
package or at least that's what worked for me, I was getting unknown
function error when trying to import them from @typebot/react

aslo in order for Typebot.showPreviewMessage() and
Typebot.hidePreviewMessage() to work, I need to import all exports as
Typebot, otherwise it didn't seem to have the named exports
"showPreviewMessage" nor "hidePreviewMessage", since I was also getting
an error when trying to import them.

this is my first PR here, I apologise for mistakes upfront.

It's ok if it is not meged, I just wanted to catch your attention on
this potential update required in the documentation of react embed

---------

Co-authored-by: Baptiste Arnaud <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants