chore: remove React 16.4's obsolete React imports (#28571)

Signed-off-by: hainenber <dotronghai96@gmail.com>
This commit is contained in:
Đỗ Trọng Hải
2024-06-05 18:13:24 +07:00
committed by GitHub
parent 8a8ce16a1f
commit 0ca42a8e4d
1173 changed files with 1360 additions and 1880 deletions

View File

@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import React from 'react';
import { ReactChild } from 'react';
import { render, screen, waitFor, within } from 'spec/helpers/testing-library';
import userEvent from '@testing-library/user-event';
import DatasourcePanel, {
@@ -38,11 +38,7 @@ import {
jest.mock(
'react-virtualized-auto-sizer',
() =>
({
children,
}: {
children: (params: { height: number }) => React.ReactChild;
}) =>
({ children }: { children: (params: { height: number }) => ReactChild }) =>
children({ height: 500 }),
);

View File

@@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
import React from 'react';
import { render, screen } from 'spec/helpers/testing-library';
import { DndItemType } from 'src/explore/components/DndItemType';
import DatasourcePanelDragOption from '.';

View File

@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import React from 'react';
import { RefObject } from 'react';
import { useDrag } from 'react-dnd';
import { css, Metric, styled } from '@superset-ui/core';
import { ColumnMeta } from '@superset-ui/chart-controls';
@@ -51,7 +51,7 @@ const DatasourceItemContainer = styled.div`
`;
interface DatasourcePanelDragOptionProps extends DatasourcePanelDndItem {
labelRef?: React.RefObject<any>;
labelRef?: RefObject<any>;
showTooltip?: boolean;
}

View File

@@ -16,8 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
import React from 'react';
import {
columns,
metrics,

View File

@@ -16,7 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
import React, { CSSProperties } from 'react';
import { CSSProperties, FC } from 'react';
import { css, Metric, styled, t, useTheme } from '@superset-ui/core';
import Icons from 'src/components/Icons';
@@ -145,7 +146,7 @@ const Box = styled.div`
`}
`;
const DatasourcePanelItem: React.FC<Props> = ({ index, style, data }) => {
const DatasourcePanelItem: FC<Props> = ({ index, style, data }) => {
const {
metricSlice: _metricSlice,
columnSlice,

View File

@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import React, { useContext, useMemo, useState } from 'react';
import { useContext, useMemo, useState } from 'react';
import {
css,
DatasourceType,