diff --git a/src/ui/modules/CustomHTML.tsx b/src/ui/modules/CustomHTML.tsx index 4e3f872..6aa0658 100644 --- a/src/ui/modules/CustomHTML.tsx +++ b/src/ui/modules/CustomHTML.tsx @@ -1,5 +1,8 @@ +'use client' + import uid from '@/lib/uid' import { stegaClean } from '@sanity/client/stega' +import { useEffect, useRef, useState } from 'react' export default function CustomHTML({ className, @@ -13,13 +16,33 @@ export default function CustomHTML({ } } >) { + const ref = useRef(null) + const [firstRender, setFirstRender] = useState(true) + if (!html?.code) return null - return ( -
- ) + if (!html.code.includes(' + ) + + // if includes