tidycal not working properly
Unanswered
Atlantic mackerel posted this in #help-forum
Atlantic mackerelOP
I'm trying to make my tidycal cdn works on the next 14 but got unsuccessful, the calendar loads great at first but after navigating to another page the content disappears.
comming back on the page I get this error though:
iFrameSizer][Host page: tidycal-embed-xjtvr] [iFrame requested init] IFrame(tidycal-embed-xjtvr) not found
any help would be appreciated
'use client'
import React, { useEffect } from 'react'
import Script from 'next/script';
export const dynamic = "force-dynamic";
const page = () => {
useEffect(() => {
//create a script and injecte it
const script = document.createElement("script");
script.src = "https://asset-tidycal.b-cdn.net/js/embed.js";
script.async = true;
document.body.appendChild(script);
script.onload = () => {
console.log(`script loaded correctly, tidycal onLoad has been populated`)
}
return () => {
console.log('stuff has been removed');
document.body.removeChild(script);
};
})
return (
<div>
<div className='tidycal-embed' data-path='etwincorp/consultation-paypal'></div>
</div>
);
}
export default pagecomming back on the page I get this error though:
iFrameSizer][Host page: tidycal-embed-xjtvr] [iFrame requested init] IFrame(tidycal-embed-xjtvr) not found
any help would be appreciated