Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/components/Homepage/feedback.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
width: 100%;
}

#contact-form {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if this is needed?

width: 50%;
}

@media (min-width: 1201px) {
}

Expand Down
18 changes: 17 additions & 1 deletion src/components/Homepage/feedback.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react";
import styles from "./feedback.module.css";
declare const window: any;

export default function Feedback({
children,
Expand All @@ -14,14 +15,29 @@ export default function Feedback({
title = "Feedback";
}

const script = document.createElement('script');
script.src='https://js.hsforms.net/forms/embed/v2.js';
document.body.appendChild(script);

script.addEventListener('load', () => {
// @TS-ignore
if (window.hbspt) {
// @TS-ignore
window.hbspt.forms.create({
portalId: '1769758',
formId: '19521728-3774-4b99-9e01-d94782691310',
target: '#contact-form'
})
}})

return (
<div className={styles.wrapper}>
<div className={styles.container}>
<div className={styles.content}>
<h2 className={styles.title}>{title}</h2>
<div className={styles.description}>{children}</div>
</div>
<div className={styles.formWrapper}>{iframe}</div>
<div id="contact-form" className={styles.formWrapper}>{iframe}</div>
</div>
</div>
);
Expand Down
Loading