resend / react-email

💌 Build and send emails using React
https://react.email
MIT License
12.67k stars 583 forks source link

feat(react-email): Redirect users back to `/` if the email is not found on `/preview` #1205

Closed gabrielmfern closed 3 weeks ago

gabrielmfern commented 4 months ago

What was the issue?

Users getting errors whenever they open an email file that doesn't exist with our error overlay. This makes sure that if the email for the slug cannot be found the user will be redirected back into /.

How can I test to make sure it's fixed?

  1. Run npx tsx ../../packages/react-email/src/cli/index.ts dev inside of ./apps/demo
  2. Open http://localhost:3000/airbnb-reviewqwdwdqwd.tsx
  3. Verify that it redirects back into http://localhost:3000
vercel[bot] commented 4 months ago

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

Name Status Preview Comments Updated (UTC)
react-email ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 8, 2024 1:26pm
1 Ignored Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **react-email-demo** | ⬜️ Ignored ([Inspect](https://vercel.com/resend/react-email-demo/FzkTweR4s24NFcg4hFgBF3cA5yoQ)) | [Visit Preview](https://react-email-demo-git-feat-redirect-users-to-root-6aaa2e-resend.vercel.app) | | May 8, 2024 1:26pm |