将TradingView小部件插入到Next.js中。
<p>我正在尝试将TradingView小部件插入到我的Next.js项目中,但是它没有显示任何内容。我在这里做错了什么吗?</p>
<pre class="brush:php;toolbar:false;">import React from 'react'
import { Helmet } from "react-helmet"
function EconomicCalendar() {
return (
<div>
<div className="tradingview-widget-container">
<div className="tradingview-widget-container__widget"></div>
<div className="tradingview-widget-copyright">
<a href="https://www.tradingview.com/" rel="noopener nofollow" target="_blank">
<span className="blue-text">Track all markets on TradingView</span>
</a>
</div>
<Helmet>
<script type="text/javascript" src="https://s3.tradingview.com/external-embedding/embed-widget-events.js" async>
{`
{
"width": "100%",
"height": "100%",
"colorTheme": "dark",
"isTransparent": false,
"locale": "en",
"importanceFilter": "-1,0,1",
"currencyFilter": "AUD,USD,CAD,CNY,EUR,FRF,DEM,ITL,JPY,KRW,MYR,MXN,NZD,SGD,ZAR,ESP,CHF,TRL,GBP"
}
`}
</script>
</Helmet>
</div>
</div>
)
}
export default EconomicCalendar</pre>
<p>通常应该怎么做</p>