Skip to content

Commit

Permalink
Add signup form
Browse files Browse the repository at this point in the history
  • Loading branch information
kukicado committed Jun 21, 2024
1 parent 5459484 commit 3fda18b
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions src/pages/autocody/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FunctionComponent } from 'react'
import { FunctionComponent, useEffect } from 'react'

import { Layout } from '../../components'

Expand Down Expand Up @@ -545,17 +545,31 @@ function AutoCodyHowItWorks(): JSX.Element {
}

function SignUp(): JSX.Element {
useEffect(() => {
const script = document.createElement('script')
script.src = '//js.hsforms.net/forms/embed/v2.js'
script.async = true
script.onload = () => {

Check failure on line 552 in src/pages/autocody/index.tsx

View workflow job for this annotation

GitHub Actions / build

Prefer `addEventListener` over `onload`
if (window.hbspt) {
window.hbspt.forms.create({
region: 'na1',
portalId: '2762526',
formId: '94e3f9f3-72c3-4ab6-8259-9743ad551cfb',
target: '#hubspotForm'
})
}
}
document.body.appendChild(script)

Check failure on line 562 in src/pages/autocody/index.tsx

View workflow job for this annotation

GitHub Actions / build

Prefer `Node#append()` over `Node#appendChild()`
}, [])

return (
<div id="waitlist-autocody" className="mx-auto max-w-3xl text-center">
<h2 className="text-4xl font-semibold !tracking-[-1px] text-[#0F111A]">Interested?</h2>
<h3 className="mx-auto mt-2 text-xl font-semibold tracking-tight text-gray-400">
Sign up for the waitlist to get notified when AutoCody is ready.
</h3>

<div className="mt-20">
FORM GOES HERE
{/* <HubSpotForm /> */}
</div>
<div id="hubspotForm" className="mt-20"></div>

Check failure on line 572 in src/pages/autocody/index.tsx

View workflow job for this annotation

GitHub Actions / build

Empty components are self-closing
</div>
)
}
Expand Down

0 comments on commit 3fda18b

Please sign in to comment.