You're very close my friend... I just:
- Created a hubspot account
- Created a form
- Copied the embed code
- Created a Slice Called HubSpot
- Tested
- Success!
import { Content, asText } from '@prismicio/client'
import { SliceComponentProps } from '@prismicio/react'
/**
* Props for `HubSpot`.
*/
export type HubSpotProps = SliceComponentProps<Content.HubSpotSlice>
/**
* Component for "HubSpot" Slices.
*/
const HubSpot = ({ slice }: HubSpotProps): JSX.Element => {
return (
<section
data-slice-type={slice.slice_type}
data-slice-variation={slice.variation}
>
<div
dangerouslySetInnerHTML={{ __html: asText(slice.primary.hubspot) }}
/>
</section>
)
}
export default HubSpot
Screenshot