import React, { FC, useMemo } from 'react'; import { Provider } from 'react-redux'; import { reportInteraction } from '@grafana/runtime'; import { Button } from '@grafana/ui'; import { store } from '../../../store/store'; import { VariableModel } from '../types'; import { NetworkGraphModal } from './NetworkGraphModal'; import { createDependencyEdges, createDependencyNodes, filterNodesWithDependencies } from './utils'; interface OwnProps { variables: VariableModel[]; } interface ConnectedProps {} interface DispatchProps {} type Props = OwnProps & ConnectedProps & DispatchProps; export const UnProvidedVariablesDependenciesButton: FC = ({ variables }) => { const nodes = useMemo(() => createDependencyNodes(variables), [variables]); const edges = useMemo(() => createDependencyEdges(variables), [variables]); if (!edges.length) { return null; } return ( {({ showModal }) => { return ( ); }} ); }; export const VariablesDependenciesButton: FC = (props) => ( );