From 4b71a6abf8b90b3dca7350bf3716320749f4c32d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B8b=C4=97rt=C3=B8?= <106074508+EchoDex@users.noreply.github.com> Date: Mon, 23 Dec 2024 11:18:39 +0400 Subject: [PATCH] fix: disable featues 2 --- src/providers/UnderConstructionProvider.tsx | 10 +++++++--- .../SpotScreen/Chart/TradingViewAdvanceWidget.tsx | 6 ++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/providers/UnderConstructionProvider.tsx b/src/providers/UnderConstructionProvider.tsx index e3ddff8a..673b1b6c 100644 --- a/src/providers/UnderConstructionProvider.tsx +++ b/src/providers/UnderConstructionProvider.tsx @@ -1,7 +1,7 @@ import React, { ReactNode } from "react"; import styled from "@emotion/styled"; -import { useFlag, useFlagsStatus } from "@unleash/proxy-client-react"; +// import { useFlag, useFlagsStatus } from "@unleash/proxy-client-react"; import Loader from "@components/Loader"; import UnderConstruction from "@screens/Errors/UnderConstruction"; @@ -11,8 +11,12 @@ interface UnderConstructionProviderProps { } export const UnderConstructionProvider: React.FC = ({ children }) => { - const isUnderConstruction = useFlag("under_construction"); - const { flagsReady } = useFlagsStatus(); + // const isUnderConstruction = useFlag("under_construction"); + // const { flagsReady } = useFlagsStatus(); + + const flagsReady = true; + const isUnderConstruction = false; + if (!flagsReady) { return ; } diff --git a/src/screens/SpotScreen/Chart/TradingViewAdvanceWidget.tsx b/src/screens/SpotScreen/Chart/TradingViewAdvanceWidget.tsx index 6920c3dc..ce441d61 100644 --- a/src/screens/SpotScreen/Chart/TradingViewAdvanceWidget.tsx +++ b/src/screens/SpotScreen/Chart/TradingViewAdvanceWidget.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useRef } from "react"; -import { useFlag } from "@unleash/proxy-client-react"; +// import { useFlag } from "@unleash/proxy-client-react"; import { observer } from "mobx-react"; import { ChartingLibraryWidgetOptions, LanguageCode, ResolutionString, widget } from "@compolabs/tradingview-chart"; @@ -35,7 +35,9 @@ const getLanguageFromURL = (): LanguageCode | null => { }; const TradingViewChartAdvance = observer(() => { - const isUnderConstruction = useFlag("Trading_view_advance_stagging_"); + // const isUnderConstruction = useFlag("Trading_view_advance_stagging_"); + const isUnderConstruction = false; + const chartContainerRef = useRef() as React.MutableRefObject; const { tradeStore } = useStores(); const defaultProps: Omit = {