Tidycal embed content disappears after navigating to another page Next.js

14 Views Asked by At

Tidycal embed content disappears after navigating to another page in Next.js consider this simple code:

rafec
...
return (
<>
<Script src='https://asset-tidycal.b-cdn.net/js/embed.js'></Script>
<div className='tidycal-embed' data-path='*****/consultation-paypal' title='hellowolrd'>
</div>
</>
)
}

When the page is loaded for the first time, the embed content is displayed, but after navigating to another page and coming back, the content is no longer there. I already tried to inject the script with a useEffect and remove it on component unmount but it has no effect on the result. Thank you for your help !

0

There are 0 best solutions below