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

15 lines
481 B
TypeScript

import { useAsync } from 'react-use';
import { DashboardScene } from '../../scene/DashboardScene';
import { getPanelDatasourceTypes, getUnsupportedDashboardDatasources } from './utils';
export function useUnsupportedDatasources(dashboard: DashboardScene) {
const { value: unsupportedDataSources } = useAsync(async () => {
const types = getPanelDatasourceTypes(dashboard);
return getUnsupportedDashboardDatasources(types);
}, []);
return unsupportedDataSources;
}