From 3cc4fb9c30bb0fa740b84b8f48cc30919a0b6526 Mon Sep 17 00:00:00 2001 From: Palash gupta Date: Thu, 19 May 2022 23:15:12 +0530 Subject: [PATCH] fix: tsc is fixed --- .../NewWidget/LeftContainer/WidgetGraph/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/index.tsx b/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/index.tsx index df58ca6cf1..dc0945be84 100644 --- a/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/index.tsx +++ b/frontend/src/container/NewWidget/LeftContainer/WidgetGraph/index.tsx @@ -5,6 +5,7 @@ import React, { memo } from 'react'; import { useSelector } from 'react-redux'; import { useLocation } from 'react-router-dom'; import { AppState } from 'store/reducers'; +import AppReducer from 'types/reducer/app'; import DashboardReducer from 'types/reducer/dashboards'; import { NewWidgetProps } from '../../index'; @@ -18,6 +19,7 @@ function WidgetGraph({ const { dashboards, isQueryFired } = useSelector( (state) => state.dashboards, ); + const { isDarkMode } = useSelector((state) => state.app); const [selectedDashboard] = dashboards; const { search } = useLocation(); @@ -31,7 +33,11 @@ function WidgetGraph({ const selectedWidget = widgets.find((e) => e.id === widgetId); if (selectedWidget === undefined) { - return Invalid widget; + return ( + + Invalid widget + + ); } const { queryData } = selectedWidget;