2025-04-01 10:38:02 +09:00

12 lines
454 B
TypeScript

import { getConnectedDashboards as apiGetConnectedDashboards } from '../../state/api';
import { DispatchResult, LibraryElementDTO } from '../../types';
import { searchCompleted } from './reducer';
export function getConnectedDashboards(libraryPanel: LibraryElementDTO): DispatchResult {
return async function (dispatch) {
const dashboards = await apiGetConnectedDashboards(libraryPanel.uid);
dispatch(searchCompleted({ dashboards }));
};
}