From ef6d847c15dd75de794fda07cde32af2710455b7 Mon Sep 17 00:00:00 2001 From: Palash Gupta Date: Sat, 20 May 2023 10:42:40 +0530 Subject: [PATCH] chore: remove the limit condition (#2737) --- .../container/GridGraphLayout/GraphLayout.tsx | 30 +------------------ .../src/container/GridGraphLayout/styles.ts | 8 ----- 2 files changed, 1 insertion(+), 37 deletions(-) diff --git a/frontend/src/container/GridGraphLayout/GraphLayout.tsx b/frontend/src/container/GridGraphLayout/GraphLayout.tsx index dbfbb7b7f5..02cbb7ed6c 100644 --- a/frontend/src/container/GridGraphLayout/GraphLayout.tsx +++ b/frontend/src/container/GridGraphLayout/GraphLayout.tsx @@ -1,9 +1,6 @@ import { PlusOutlined, SaveFilled } from '@ant-design/icons'; -import { Typography } from 'antd'; -import { FeatureKeys } from 'constants/features'; import useComponentPermission from 'hooks/useComponentPermission'; import { useIsDarkMode } from 'hooks/useDarkMode'; -import useFeatureFlag, { MESSAGE } from 'hooks/useFeatureFlag'; import { Dispatch, SetStateAction } from 'react'; import { Layout } from 'react-grid-layout'; import { useSelector } from 'react-redux'; @@ -17,7 +14,6 @@ import { ButtonContainer, Card, CardContainer, - NoPanelAvialable, ReactGridLayout, } from './styles'; @@ -39,8 +35,6 @@ function GraphLayout({ role, ); - const queryBuilderFeature = useFeatureFlag(FeatureKeys.QUERY_BUILDER_PANELS); - return ( <> @@ -80,31 +74,9 @@ function GraphLayout({ onLayoutChange={onLayoutChangeHandler} draggableHandle=".drag-handle" > - {layouts.map(({ Component, ...rest }, layoutIndex) => { + {layouts.map(({ Component, ...rest }) => { const currentWidget = (widgets || [])?.find((e) => e.id === rest.i); - const usageLimit = queryBuilderFeature?.usage_limit || 0; - - const isPanelNotAvialable = usageLimit > 0 && usageLimit <= layoutIndex; - - if (isPanelNotAvialable) { - return ( - - - - - {MESSAGE.WIDGET.replace('{{widget}}', usageLimit.toString())} - - - - - ); - } - return ( ` - display: flex; - justify-content: center; - align-items: center; - - height: 100%; -`;