Updated "react-use" package to newest version (#37579)

* package.json: updated react-use to newest version

* fixes (typescript and other)
This commit is contained in:
Gábor Farkas
2021-08-05 14:32:51 +02:00
committed by GitHub
parent 8073be2e4e
commit 9417e86316
10 changed files with 115 additions and 93 deletions

View File

@@ -11,7 +11,7 @@ import { PanelInspectActionSupplier } from './PanelInspectActions';
* Given PanelData return first data source supporting metadata inspector
*/
export const useDatasourceMetadata = (data?: PanelData) => {
const state = useAsync<DataSourceApi | undefined>(async () => {
const state = useAsync(async () => {
const targets = data?.request?.targets || [];
if (data && data.series && targets.length) {