mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 13:49:00 +08:00
fix: tsc is fixed
This commit is contained in:
parent
22f9069a29
commit
3cc4fb9c30
@ -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<AppState, DashboardReducer>(
|
||||
(state) => state.dashboards,
|
||||
);
|
||||
const { isDarkMode } = useSelector<AppState, AppReducer>((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 <Card isQueryType={false}>Invalid widget</Card>;
|
||||
return (
|
||||
<Card isDarkMode={isDarkMode} isQueryType={false}>
|
||||
Invalid widget
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
|
||||
const { queryData } = selectedWidget;
|
||||
|
Loading…
x
Reference in New Issue
Block a user