From 39428803291a38a73b72069ab18563ae94665add Mon Sep 17 00:00:00 2001 From: Chandan Giri Date: Mon, 24 Aug 2026 00:35:45 +0530 Subject: [PATCH] Fix form submit bug and changelog link --- PR.md | 39 +++++++++++++++++++ src/components/Footer.jsx | 2 +- src/components/marketing/sales/form.tsx | 2 +- .../marketing/talk-to-an-engineer/form.tsx | 5 +-- 4 files changed, 42 insertions(+), 6 deletions(-) create mode 100644 PR.md diff --git a/PR.md b/PR.md new file mode 100644 index 0000000..c8e6a0c --- /dev/null +++ b/PR.md @@ -0,0 +1,39 @@ +# PR Summary + +## Title +Fix contact form submit crash and incorrect changelog link + +## Summary +This fix addresses a real runtime bug in the marketing contact forms and corrects the footer navigation for the changelog route. + +## Changes made +- Fixed invalid `FormData` conversion in the sales and engineer contact forms. +- Replaced `formData.entries().toArray()` with `Array.from(formData.entries())` to ensure the form data is converted correctly. +- Corrected the footer changelog link from `/blog/` to `/changelog/`. + +## Files changed +- `src/components/marketing/talk-to-an-engineer/form.tsx` +- `src/components/marketing/sales/form.tsx` +- `src/components/Footer.jsx` + +## Why this was needed +The contact forms were throwing at submit time because `FormData.entries()` does not support `.toArray()`. This caused the lead capture flow to break. The changelog link was also routing to the wrong section. + +## Verification status +I ran the build check with: + +```bash +pnpm build +``` + +The build is currently failing before the app compiles because of an environment-level Windows symlink permission issue in: + +- `scripts/assemble.ts` + +with the following error: + +```bash +Error: EPERM: operation not permitted, symlink '..\..\..\vendor\actors\docs\content' -> 'C:\Users\Manish Tiwari\Desktop\New Company Target\website\src\content\docs\actors' +``` + +Because the build is still failing, this is not ready to be pushed as a GitHub PR yet. diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index a82d1dc..6905f52 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -32,7 +32,7 @@ const footer = { ], devs: [ { name: "Documentation", href: "/docs" }, - { name: "Changelog", href: "/blog/" }, + { name: "Changelog", href: "/changelog/" }, { name: "Status Page", href: "https://rivet.betteruptime.com/" }, ], resources: [ diff --git a/src/components/marketing/sales/form.tsx b/src/components/marketing/sales/form.tsx index 2ce8f6b..bd4be65 100644 --- a/src/components/marketing/sales/form.tsx +++ b/src/components/marketing/sales/form.tsx @@ -24,7 +24,7 @@ export function SalesForm() { setIsSubmitting(true); const formData = new FormData(event.currentTarget); - const data = Object.fromEntries(formData.entries().toArray()); + const data = Object.fromEntries(Array.from(formData.entries())); try { posthog.capture("survey sent", { diff --git a/src/components/marketing/talk-to-an-engineer/form.tsx b/src/components/marketing/talk-to-an-engineer/form.tsx index 312972b..b5a338f 100644 --- a/src/components/marketing/talk-to-an-engineer/form.tsx +++ b/src/components/marketing/talk-to-an-engineer/form.tsx @@ -25,10 +25,7 @@ export function TalkToAnEngineerForm() { setIsSubmitting(true); const formData = new FormData(event.currentTarget); - - const data = Object.fromEntries(formData.entries().toArray()); - - console.log(data); + const data = Object.fromEntries(Array.from(formData.entries())); try { posthog.capture("survey sent", {