Skip to content

Commit

Permalink
Switch to the API backed contact form
Browse files Browse the repository at this point in the history
  • Loading branch information
pimterry committed Dec 12, 2024
1 parent 8efbd75 commit 47ec893
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/app/(thank-you-pages)/contact-thank-you/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { LandingLayout } from '@/components/layout/landing-layout';
import { SuccessHero } from '@/components/sections/success-hero';

import { Text } from '@/components/elements/text';
import { Link } from '@/components/elements/link';
import { Button } from '@/components/elements/button';
import Stack from '@/components/elements/stack';

Expand All @@ -28,7 +27,7 @@ export default function ContactThankYouPage() {
<Button
href="https://github.com/httptoolkit/httptoolkit/issues/"
$variant="secondary"
>Check out GitHub</Button>
>Discuss on GitHub</Button>
</Stack>
}
/>
Expand Down
11 changes: 10 additions & 1 deletion src/components/sections/contact-form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Input } from '@/components/modules/input';
export const ContactForm = () => {
return (
<StyledContactFormWrapper>
<form action="https://formspree.io/f/xvoyrlba" method="POST">
<form action="https://accounts.httptoolkit.tech/api/contact-form" method="POST">
<Stack $gapxl="32px">
<Stack $gapxl="16px">
<Input label="Your Name" id="name" placeholder="e.g. Holly Smith" required type="text" />
Expand All @@ -19,6 +19,15 @@ export const ContactForm = () => {
placeholder="Your message..."
required
/>
<div style={{ display: 'none' }}>
<Input
label="Phone number (this should be invisible - don't complete it)"
id="phone"
type="text"
value=""
placeholder="If you're a real person, leave this empty"
/>
</div>
</Stack>
<Button type="submit" $isFluid>
Submit the form
Expand Down

0 comments on commit 47ec893

Please sign in to comment.