From 6afd700fddf08a70ed2b511460034b15755fa29e Mon Sep 17 00:00:00 2001 From: johnlindquist Date: Thu, 30 Jan 2025 13:50:43 -0700 Subject: [PATCH] fix: typeform --- src/components/workshop/cursor/SignUpForm.tsx | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/components/workshop/cursor/SignUpForm.tsx b/src/components/workshop/cursor/SignUpForm.tsx index 0adc51a56..08f021dd1 100644 --- a/src/components/workshop/cursor/SignUpForm.tsx +++ b/src/components/workshop/cursor/SignUpForm.tsx @@ -1,8 +1,7 @@ 'use client' -import {forwardRef} from 'react' +import {forwardRef, useEffect} from 'react' import {motion} from 'framer-motion' -import {Widget} from '@typeform/embed-react' import {fadeInUp} from './animations' export interface SignUpFormRef { @@ -10,6 +9,17 @@ export interface SignUpFormRef { } const SignUpForm = forwardRef((props, ref) => { + useEffect(() => { + const script = document.createElement('script') + script.src = '//embed.typeform.com/next/embed.js' + script.async = true + document.body.appendChild(script) + + return () => { + document.body.removeChild(script) + } + }, []) + return (
@@ -30,7 +40,11 @@ const SignUpForm = forwardRef((props, ref) => { confidence.

- +