Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions PR.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion src/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
2 changes: 1 addition & 1 deletion src/components/marketing/sales/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down
5 changes: 1 addition & 4 deletions src/components/marketing/talk-to-an-engineer/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down