网站链接:https ://zen-stonebraker-8640d3.netlify.com/
我不知道问题是什么,如果您单击站点链接并查看,Calendly 不会出现在站点上。我不确定这是我的代码问题还是 Netlify 的部署问题。该小部件在生产期间出现在我的本地主机上,但在部署期间未出现。请帮忙。
import React from 'react';
class Calendly extends React.Component {
calendlyScriptSrc = 'https://assets.calendly.com/assets/external/widget.js';
componentDidMount() {
const head = document.querySelector('head');
const script = document.createElement('script');
script.setAttribute('src', this.calendlyScriptSrc);
head.appendChild(script);
}
componentWillUnmount() {
const head = document.querySelector('head');
const script = document.querySelector('script');
head.removeChild(script);
}
render() {
return (
<div id="schedule_form">
<div
className="calendly-inline-widget"
data-url="https://calendly.com/handofgravity"
style={{ minWidth: '480px', height: '640px' }}
/>
</div>
);
}
}
export default Calendly;