fix: fixed the trading chart load

This commit is contained in:
Linkie Link 2023-11-14 10:38:55 +01:00
parent e11875f74f
commit 8e4197a706
No known key found for this signature in database
GPG Key ID: 5318B0F2564D38EA

View File

@ -2,8 +2,8 @@ import dynamic from 'next/dynamic'
import Script from 'next/script'
import { useState } from 'react'
import { CircularProgress } from 'components/CircularProgress'
import Card from 'components/Card'
import { CircularProgress } from 'components/CircularProgress'
const TVChartContainer = dynamic(
() => import('components/Trade/TradeChart/TVChartContainer').then((mod) => mod.TVChartContainer),
@ -26,6 +26,9 @@ export default function TradeChart(props: Props) {
onReady={() => {
setIsScriptReady(true)
}}
onLoad={() => {
setIsScriptReady(true)
}}
/>
{isScriptReady ? (
<TVChartContainer buyAsset={props.buyAsset} sellAsset={props.sellAsset} />