diff --git a/app/(pages)/(marketing)/page.tsx b/app/(pages)/(marketing)/page.tsx index 6b3d3435..358d8b93 100644 --- a/app/(pages)/(marketing)/page.tsx +++ b/app/(pages)/(marketing)/page.tsx @@ -1,5 +1,5 @@ import Button from '@/_components/button'; -import ContactForm from '@/_components/contact-form'; +import ArrowUpRightIcon from '@heroicons/react/24/outline/ArrowUpRightIcon'; const Page = () => (
@@ -43,18 +43,22 @@ const Page = () => ( changes with your clients.

- Streamline data collection, create data-driven protocols and - easily monitor progress. -

-
- -
-

- Have an account? - + Streamline data collection, + create data-driven protocols{' '} + and easily{' '} + monitor progress.

+ +
); diff --git a/app/_components/contact-form.tsx b/app/_components/contact-form.tsx deleted file mode 100644 index 28c8c65f..00000000 --- a/app/_components/contact-form.tsx +++ /dev/null @@ -1,87 +0,0 @@ -'use client'; - -import Button from '@/_components/button'; -import Input from '@/_components/input'; -import InputRoot from '@/_components/input-root'; -import * as Label from '@/_components/label'; -import RichTextarea from '@/_components/rich-textarea'; -import { IOption } from '@/_components/select'; -import newLead from '@/_mutations/new-lead'; -import { Controller, useForm } from 'react-hook-form'; - -export interface ContactFormValues { - comment: string; - email: string; - name: string; - profession?: IOption; - website?: string; -} - -const ContactForm = () => { - const form = useForm({ - defaultValues: { - comment: '', - email: '', - name: '', - website: '', - }, - }); - - return ( -
newLead(values))} - > - - Name - - - - Email address - - - - Company website - - - - Profession - - - - Primary behavior cases - ( - - )} - /> - - {form.formState.errors.root && ( -
{form.formState.errors.root.message}
- )} - {form.formState.isSubmitSuccessful ? ( -

- Thank you for your interest in llog! -
- We will be in touch soon. -

- ) : ( - - )} -
- ); -}; - -export default ContactForm; diff --git a/app/_mutations/new-lead.ts b/app/_mutations/new-lead.ts deleted file mode 100644 index be507e24..00000000 --- a/app/_mutations/new-lead.ts +++ /dev/null @@ -1,22 +0,0 @@ -'use server'; - -import { ContactFormValues } from '@/_components/contact-form'; -import sanitizeHtml from '@/_utilities/sanitize-html'; -import { Resend } from 'resend'; - -const newLead = async (data: ContactFormValues) => { - const resend = new Resend(process.env.RESEND_API_KEY); - - await resend.emails.send({ - from: 'system@llog.app', - html: `
${JSON.stringify(
-      { ...data, comment: sanitizeHtml(data.comment) },
-      null,
-      2,
-    )}
`, - subject: 'New llog demo request', - to: ['cade@llog.app'], - }); -}; - -export default newLead;