fix order
This commit is contained in:
parent
8b183207f0
commit
38dd5f6e88
@ -76,6 +76,19 @@ export const TvChart = () => {
|
||||
tvWidget?.activeChart().setVisibleRange(newRange, { percentRightMargin: 10 });
|
||||
};
|
||||
|
||||
/**
|
||||
* @description Hook to handle changing chart resolution
|
||||
*/
|
||||
useEffect(() => {
|
||||
if (chartResolution) {
|
||||
if (chartResolution !== selectedResolution) {
|
||||
dispatch(setTvChartResolution({ marketId: currentMarketId, resolution: chartResolution }));
|
||||
}
|
||||
|
||||
setVisibleRangeForResolution({ resolution: chartResolution });
|
||||
}
|
||||
}, [chartResolution]);
|
||||
|
||||
/**
|
||||
* @description Hook to handle changing markets
|
||||
*/
|
||||
@ -191,19 +204,6 @@ export const TvChart = () => {
|
||||
orderLines = {};
|
||||
};
|
||||
|
||||
/**
|
||||
* @description Hook to handle changing chart resolution
|
||||
*/
|
||||
useEffect(() => {
|
||||
if (chartResolution) {
|
||||
if (chartResolution !== selectedResolution) {
|
||||
dispatch(setTvChartResolution({ marketId: currentMarketId, resolution: chartResolution }));
|
||||
}
|
||||
|
||||
setVisibleRangeForResolution({ resolution: chartResolution });
|
||||
}
|
||||
}, [chartResolution]);
|
||||
|
||||
return (
|
||||
<Styled.PriceChart isChartReady={isChartReady}>
|
||||
{!isChartReady && <LoadingSpace id="tv-chart-loading" />}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user