mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 01:45:53 +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 { useSelector } from 'react-redux';
|
||||||
import { useLocation } from 'react-router-dom';
|
import { useLocation } from 'react-router-dom';
|
||||||
import { AppState } from 'store/reducers';
|
import { AppState } from 'store/reducers';
|
||||||
|
import AppReducer from 'types/reducer/app';
|
||||||
import DashboardReducer from 'types/reducer/dashboards';
|
import DashboardReducer from 'types/reducer/dashboards';
|
||||||
|
|
||||||
import { NewWidgetProps } from '../../index';
|
import { NewWidgetProps } from '../../index';
|
||||||
@ -18,6 +19,7 @@ function WidgetGraph({
|
|||||||
const { dashboards, isQueryFired } = useSelector<AppState, DashboardReducer>(
|
const { dashboards, isQueryFired } = useSelector<AppState, DashboardReducer>(
|
||||||
(state) => state.dashboards,
|
(state) => state.dashboards,
|
||||||
);
|
);
|
||||||
|
const { isDarkMode } = useSelector<AppState, AppReducer>((state) => state.app);
|
||||||
const [selectedDashboard] = dashboards;
|
const [selectedDashboard] = dashboards;
|
||||||
const { search } = useLocation();
|
const { search } = useLocation();
|
||||||
|
|
||||||
@ -31,7 +33,11 @@ function WidgetGraph({
|
|||||||
const selectedWidget = widgets.find((e) => e.id === widgetId);
|
const selectedWidget = widgets.find((e) => e.id === widgetId);
|
||||||
|
|
||||||
if (selectedWidget === undefined) {
|
if (selectedWidget === undefined) {
|
||||||
return <Card isQueryType={false}>Invalid widget</Card>;
|
return (
|
||||||
|
<Card isDarkMode={isDarkMode} isQueryType={false}>
|
||||||
|
Invalid widget
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { queryData } = selectedWidget;
|
const { queryData } = selectedWidget;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user