-
Bug
-
Resolution: Won't Fix
-
Should have
-
None
-
None
-
3
-
Block: Happy Point
The HubSpot embed added in the Happy Point can only be run once per page.
There are 2 issues to fix:
- Change the fixed div ID to a variable one (useRef + uniqueId like Timeline.js)
- Trigger the HubSpot code only once
Embed code execution is linked to the loading of the hubspot script; since it is only loaded once, trying to add another embed won't execute the code. Executing the code based only on the script presence sometimes runs it twice for the same component, effectively adding twice the same form in the target div. I couldn't find a solution that wouldn't end in a React rendering loop for this.
- relates to
-
PLANET-6496 HappyPoint: add option for Hubspot form embed
- CLOSED