actions.ts 454 B

1234567891011
  1. import { getConnectedDashboards as apiGetConnectedDashboards } from '../../state/api';
  2. import { DispatchResult, LibraryElementDTO } from '../../types';
  3. import { searchCompleted } from './reducer';
  4. export function getConnectedDashboards(libraryPanel: LibraryElementDTO): DispatchResult {
  5. return async function (dispatch) {
  6. const dashboards = await apiGetConnectedDashboards(libraryPanel.uid);
  7. dispatch(searchCompleted({ dashboards }));
  8. };
  9. }