mirror of
https://github.com/grafana/grafana.git
synced 2025-09-25 08:54:20 +08:00
Chore: remove usages of FunctionComponent in elasticsearch plugin (#33175)
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import React, { Context, createContext, FunctionComponent, useCallback, useContext } from 'react';
|
||||
import React, { Context, createContext, PropsWithChildren, useCallback, useContext } from 'react';
|
||||
import { ElasticDatasource } from '../../datasource';
|
||||
import { combineReducers, useStatelessReducer, DispatchContext } from '../../hooks/useStatelessReducer';
|
||||
import { ElasticsearchQuery } from '../../types';
|
||||
@ -20,14 +20,14 @@ interface Props {
|
||||
range: TimeRange;
|
||||
}
|
||||
|
||||
export const ElasticsearchProvider: FunctionComponent<Props> = ({
|
||||
export const ElasticsearchProvider = ({
|
||||
children,
|
||||
onChange,
|
||||
onRunQuery,
|
||||
query,
|
||||
datasource,
|
||||
range,
|
||||
}) => {
|
||||
}: PropsWithChildren<Props>) => {
|
||||
const onStateChange = useCallback(
|
||||
(query: ElasticsearchQuery) => {
|
||||
onChange(query);
|
||||
|
Reference in New Issue
Block a user