Skip to content

Commit 47ec893

Browse files
committed
Switch to the API backed contact form
1 parent 8efbd75 commit 47ec893

File tree

2 files changed

+11
-3
lines changed
  • src
    • app/(thank-you-pages)/contact-thank-you
    • components/sections/contact-form

2 files changed

+11
-3
lines changed

src/app/(thank-you-pages)/contact-thank-you/page.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { LandingLayout } from '@/components/layout/landing-layout';
22
import { SuccessHero } from '@/components/sections/success-hero';
33

44
import { Text } from '@/components/elements/text';
5-
import { Link } from '@/components/elements/link';
65
import { Button } from '@/components/elements/button';
76
import Stack from '@/components/elements/stack';
87

@@ -28,7 +27,7 @@ export default function ContactThankYouPage() {
2827
<Button
2928
href="https://github.com/httptoolkit/httptoolkit/issues/"
3029
$variant="secondary"
31-
>Check out GitHub</Button>
30+
>Discuss on GitHub</Button>
3231
</Stack>
3332
}
3433
/>

src/components/sections/contact-form/index.tsx

+10-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Input } from '@/components/modules/input';
77
export const ContactForm = () => {
88
return (
99
<StyledContactFormWrapper>
10-
<form action="https://formspree.io/f/xvoyrlba" method="POST">
10+
<form action="https://accounts.httptoolkit.tech/api/contact-form" method="POST">
1111
<Stack $gapxl="32px">
1212
<Stack $gapxl="16px">
1313
<Input label="Your Name" id="name" placeholder="e.g. Holly Smith" required type="text" />
@@ -19,6 +19,15 @@ export const ContactForm = () => {
1919
placeholder="Your message..."
2020
required
2121
/>
22+
<div style={{ display: 'none' }}>
23+
<Input
24+
label="Phone number (this should be invisible - don't complete it)"
25+
id="phone"
26+
type="text"
27+
value=""
28+
placeholder="If you're a real person, leave this empty"
29+
/>
30+
</div>
2231
</Stack>
2332
<Button type="submit" $isFluid>
2433
Submit the form

0 commit comments

Comments
 (0)