react-calendly in Next.js: Target container is not a DOM element
Only render the Calendly component on the client. Either wrap it in a client-side guard that only renders when window is defined (passing the PopupButton its url, rootElement and text props), or load it with next/dynamic with server-side rendering disabled, importing PopupButton from react-calendly.…