-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
creating a contact page and hubspot form #9666
base: main
Are you sure you want to change the base?
Conversation
@ameliedrhub FYI |
- Implement React state for mounting the HubSpot form component - Introduce TypeScript declaration to extend the global window object for hbspt forms - Modify script loading and unloading for the HubSpot form to improve performance and cleanup - Ensure the form only renders on the client side to align with its JavaScript requirements [front/pages/home] - refactor: adjust contact page layout and remove unused imports - Simplify the contact page layout by removing nested divs around the HubSpotForm - Remove an unused useState import and adjust import ordering for consistency - Fix the layout for the subtitle section in the HeaderContentBlock component - Add proper paragraph formatting for the subtitle text for better readability
useEffect(() => { | ||
setIsMounted(true); | ||
const script = document.createElement("script"); | ||
script.src = "//js-eu1.hsforms.net/forms/embed/v2.js"; | ||
script.async = true; | ||
script.onload = () => { | ||
if (window.hbspt) { | ||
window.hbspt.forms.create({ | ||
region: "eu1", | ||
portalId: "144442587", | ||
formId: "7cc5ca02-5547-42ca-98b5-80e5e3c422eb", | ||
target: "#hubspotForm", | ||
}); | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a lib react-hubspot-form with a component for it no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like last release was 6 years ago though..
|
||
useEffect(() => { | ||
setIsMounted(true); | ||
const script = document.createElement("script"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is very likely to cause a hydratation error indeed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defs
Will try it out and come up with a suggestion tomorrow 👍 |
@aubin-tchoi @JulesBelveze any solution here? or is it painful? :) |
damn I can't seem to get it to work... |
@JulesBelveze will let you give it a try 😇 |
Description
Adding a contact form that feeds directly into hubspot & changing to 'trusted by 1000+ organizations'.
For now, this is just a silent release (only accessible via dust.tt/home/contact url). I'd like to release it now to test it. We'll then finalize the form directly in hubspot, and add/change hyperlinks everywhere as we land.