Closed tom3rr closed 6 months ago
Not sure what you're describing. That url works fine?
I am sorry for not being clear enough. The url is for referencing the samples that are not working locally.
If I copy the code from that sample page, for example the Airbnb-review, and use it as it is in my local dev environment, it is not working.
AirbnbReviewEmail.PreviewProps = { authorName: 'Joker', authorImage:
${baseUrl}batman-twilight.jpg, reviewText:
"Batsy's stay at my Airbnb Batcave was a riot! Batman surprised with a hidden sense of humor, engaging in epic banter and a prank war. His detective skills impressed, and the Batcave remained spotless. Game night and snacks were a hit, and even during downtime, he couldn't resist a Bat-signal. Hosting Batsy was chaos perfected – if you want a guest with brooding intensity and unexpected laughter, Batman's your Bat. Hahahahahahahahahaha! " } as AirbnbReviewEmailProps;
It seems that the above snippet, the PreviewProps definition is not working locally as it is not recognized. Am I doing something wrong?
Am I doing something wrong?
Probably not :)
Could you put together a reproduction using https://stackblitz.com/edit/jsx-email-repro when you have the chance? I'm not able to reproduce locally, but that doesn't mean your issue doesn't exist. A reproduction will help me see the same code in the same environment as you so that I can debug.
Sure thing, here it is: https://stackblitz.com/edit/jsx-email-repro-vzgqmc
Perfect thanks
@jsxp-email/cli
Version?:Expected Behavior
Using a sample, it should open in the email preview with the defined props in PreviewProps.
Actual Behavior
Preview page is blank, console.log throwing "PreviewProps is not a function" error.
Additional Information
Using any example from the email samples out-of-the-box is not working as most of them have PreviewProps defined. If this is a docs issue, please let me know how to provide template props for previews.