Skip to content

Commit e0ac221

Browse files
committed
clean up some double imports
1 parent 1494f5d commit e0ac221

File tree

21 files changed

+21
-48
lines changed

21 files changed

+21
-48
lines changed

packages/react-charts/src/victory/components/Chart/Chart.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Children, cloneElement, isValidElement } from 'react';
1+
import { Children, cloneElement, isValidElement, useEffect } from 'react';
22
import hoistNonReactStatics from 'hoist-non-react-statics';
33

44
/* eslint-disable camelcase */
@@ -30,7 +30,6 @@ import { getComputedLegend, getLegendItemsExtraHeight, getLegendMaxTextWidth } f
3030
import { getPaddingForSide } from '../ChartUtils/chart-padding';
3131
import { getPatternDefs, mergePatternData, useDefaultPatternProps } from '../ChartUtils/chart-patterns';
3232
import { getChartTheme } from '../ChartUtils/chart-theme-types';
33-
import { useEffect } from 'react';
3433
import { ChartLabel } from '../ChartLabel/ChartLabel';
3534
import { ChartPoint } from '../ChartPoint/ChartPoint';
3635
import { ChartThemeColor } from '../ChartTheme/ChartThemeColor';

packages/react-charts/src/victory/components/ChartBullet/ChartBullet.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { cloneElement, Fragment } from 'react';
1+
import { cloneElement, Fragment, useEffect } from 'react';
22
import hoistNonReactStatics from 'hoist-non-react-statics';
33
import { DataGetterPropType, DomainPropType, PaddingProps } from 'victory-core';
44
import { VictoryChart } from 'victory-chart';
@@ -28,7 +28,6 @@ import { ChartBulletQualitativeRange } from './ChartBulletQualitativeRange';
2828
import { getBulletDomain } from './utils/chart-bullet-domain';
2929
import { getBulletThemeWithLegendColorScale } from './utils/chart-bullet-theme';
3030
import { getPaddingForSide } from '../ChartUtils/chart-padding';
31-
import { useEffect } from 'react';
3231
import { ChartPoint } from '../ChartPoint/ChartPoint';
3332
import { ChartLabel } from '../ChartLabel/ChartLabel';
3433

packages/react-charts/src/victory/components/ChartPie/ChartPie.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { cloneElement, Fragment } from 'react';
1+
import { cloneElement, Fragment, useEffect } from 'react';
22
import hoistNonReactStatics from 'hoist-non-react-statics';
33
import {
44
AnimatePropTypeInterface,
@@ -32,7 +32,6 @@ import { getComputedLegend, getLegendItemsExtraHeight, getLegendMaxTextWidth } f
3232
import { getPaddingForSide } from '../ChartUtils/chart-padding';
3333
import { getPatternDefs, useDefaultPatternProps } from '../ChartUtils/chart-patterns';
3434
import { getTheme } from '../ChartUtils/chart-theme';
35-
import { useEffect } from 'react';
3635
import { ChartPoint } from '../ChartPoint/ChartPoint';
3736
import { ChartLabel } from '../ChartLabel/ChartLabel';
3837

packages/react-core/src/components/Card/Card.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import { createContext } from 'react';
1+
import { createContext, type JSX } from 'react';
22
import styles from '@patternfly/react-styles/css/components/Card/card';
33
import { css } from '@patternfly/react-styles';
44
import { useOUIAProps, OUIAProps } from '../../helpers';
55

6-
import type { JSX } from 'react';
7-
86
export interface CardProps extends React.HTMLProps<HTMLElement>, OUIAProps {
97
/** Content rendered inside the Card */
108
children?: React.ReactNode;

packages/react-core/src/components/Card/CardTitle.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import { useContext } from 'react';
1+
import { useContext, type JSX } from 'react';
22
import { css } from '@patternfly/react-styles';
33
import styles from '@patternfly/react-styles/css/components/Card/card';
44
import { CardContext } from './Card';
55

6-
import type { JSX } from 'react';
7-
86
export interface CardTitleProps extends React.HTMLProps<HTMLDivElement> {
97
/** Content rendered inside the CardTitle */
108
children?: React.ReactNode;

packages/react-core/src/components/DatePicker/DatePicker.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { forwardRef, useEffect, useMemo, useRef, useState } from 'react';
1+
import { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
22
import { css } from '@patternfly/react-styles';
33
import styles from '@patternfly/react-styles/css/components/DatePicker/date-picker';
44
import calendarMonthStyles from '@patternfly/react-styles/css/components/CalendarMonth/calendar-month';
@@ -8,7 +8,6 @@ import { Popover, PopoverProps } from '../Popover/Popover';
88
import { InputGroup, InputGroupItem } from '../InputGroup';
99
import OutlinedCalendarAltIcon from '@patternfly/react-icons/dist/esm/icons/outlined-calendar-alt-icon';
1010
import { CalendarMonth, CalendarFormat } from '../CalendarMonth';
11-
import { useImperativeHandle } from 'react';
1211
import { KeyTypes } from '../../helpers';
1312
import { isValidDate } from '../../helpers/datetimeUtils';
1413
import { HelperText, HelperTextItem } from '../HelperText';

packages/react-core/src/components/Form/FormGroup.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Fragment } from 'react';
2-
import { isValidElement } from 'react';
1+
import { Fragment, isValidElement } from 'react';
32
import styles from '@patternfly/react-styles/css/components/Form/form';
43
import { ASTERISK } from '../../helpers/htmlConstants';
54
import { css } from '@patternfly/react-styles';

packages/react-core/src/components/Page/Page.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, createRef } from 'react';
1+
import { Component, createRef, type JSX } from 'react';
22
import styles from '@patternfly/react-styles/css/components/Page/page';
33
import { css } from '@patternfly/react-styles';
44
import globalBreakpointXl from '@patternfly/react-tokens/dist/esm/t_global_breakpoint_xl';
@@ -11,8 +11,6 @@ import { getBreakpoint, getVerticalBreakpoint } from '../../helpers/util';
1111
import { PageContextProvider } from './PageContext';
1212
import { PageBody } from './PageBody';
1313

14-
import type { JSX } from 'react';
15-
1614
export enum PageLayouts {
1715
vertical = 'vertical',
1816
horizontal = 'horizontal'

packages/react-core/src/components/Page/PageSection.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
import { useContext, useEffect } from 'react';
1+
import { useContext, useEffect, type JSX } from 'react';
22
import styles from '@patternfly/react-styles/css/components/Page/page';
33
import { css } from '@patternfly/react-styles';
44
import { formatBreakpointMods } from '../../helpers/util';
55
import { PageContext } from './PageContext';
66
import { PageBody } from './PageBody';
77

8-
import type { JSX } from 'react';
9-
108
export enum PageSectionVariants {
119
default = 'default',
1210
secondary = 'secondary'

packages/react-core/src/components/Panel/__tests__/Panel.test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import { createRef, useState } from 'react';
1+
import { createRef, useEffect, useState } from 'react';
22
import { render, screen } from '@testing-library/react';
33
import { Panel } from '../Panel';
44
import { PanelMain } from '../PanelMain';
55
import { PanelMainBody } from '../PanelMainBody';
66
import userEvent from '@testing-library/user-event';
7-
import { useEffect } from 'react';
87
import styles from '@patternfly/react-styles/css/components/Panel/panel';
98

109
test('Renders without children', () => {

0 commit comments

Comments
 (0)