import React, { FC } from 'react'; import { Alert } from 'reactstrap'; import Graph from './Graph'; import { QueryParams } from '../../types/types'; import { isPresent } from '../../utils'; interface GraphTabContentProps { data: any; stacked: boolean; useLocalTime: boolean; lastQueryParams: QueryParams | null; } export const GraphTabContent: FC = ({ data, stacked, useLocalTime, lastQueryParams }) => { if (!isPresent(data)) { return No data queried yet; } if (data.result.length === 0) { return Empty query result; } if (data.resultType !== 'matrix') { return ( Query result is of wrong type '{data.resultType}', should be 'matrix' (range vector). ); } return ; };